MCPcopy Index your code
hub / github.com/microsoft/typescript-go / encode

Method encode

internal/api/encoder/stringtable.go:54–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func (t *stringTable) encode() []byte {
55 result := make([]byte, 0, t.encodedLength())
56 result = appendUint32s(result, t.offsets...)
57 result = append(result, t.fileText...)
58 result = append(result, t.otherStrings.String()...)
59 return result
60}
61
62func (t *stringTable) stringLength() int {
63 return len(t.fileText) + t.otherStrings.Len()

Callers 1

encodeTreeFunction · 0.95

Calls 5

encodedLengthMethod · 0.95
appendUint32sFunction · 0.85
StringMethod · 0.65
makeFunction · 0.50
appendFunction · 0.50

Tested by

no test coverage detected