MCPcopy Create free account
hub / github.com/arguiot/TheoremJS / bin2str

Method bin2str

__test__/theorem.js:1351–1355  ·  view source on GitHub ↗
(txt)

Source from the content-addressed store, hash-verified

1349 return array.slice(0).reverse() // duplicate and reverse to duplicate the array
1350 }
1351 bin2str(txt) {
1352 return txt.replace(/\s*[01]{8}\s*/g, function(bin) {
1353 return String.fromCharCode(parseInt(bin, 2))
1354 })
1355 }
1356 huffmanEncode(str) {
1357 const tree = createTree(str);
1358 const codebook = createCodebook(tree);

Callers 1

test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected