MCPcopy Create free account
hub / github.com/SheepChef/Abracadabra / append_switch_code

Function append_switch_code

src/javascript/unishox2.js:161–167  ·  view source on GitHub ↗
(out, olen, ol, state)

Source from the content-addressed store, hash-verified

159}
160
161function append_switch_code(out, olen, ol, state) {
162 if (state == USX_DELTA) {
163 ol = append_bits(out, olen, ol, UNI_STATE_SPL_CODE, UNI_STATE_SPL_CODE_LEN);
164 ol = append_bits(out, olen, ol, UNI_STATE_SW_CODE, UNI_STATE_SW_CODE_LEN);
165 } else ol = append_bits(out, olen, ol, SW_CODE, SW_CODE_LEN);
166 return ol;
167}
168
169function append_code(out, olen, ol, code, state, usx_hcodes, usx_hcode_lens) {
170 var hcode = code >> 5;

Callers 6

append_codeFunction · 0.85
matchOccuranceFunction · 0.85
matchLineFunction · 0.85
append_nibble_escapeFunction · 0.85
append_final_bitsFunction · 0.85
unishox2_compressFunction · 0.85

Calls 1

append_bitsFunction · 0.85

Tested by

no test coverage detected