{"id":16937416,"url":"https://github.com/copy/jslzjb-k","last_synced_at":"2025-07-05T06:33:19.741Z","repository":{"id":32261923,"uuid":"35836384","full_name":"copy/jslzjb-k","owner":"copy","description":"Fast compression for JavaScript (browser and node)","archived":false,"fork":false,"pushed_at":"2016-07-17T19:45:11.000Z","size":6,"stargazers_count":28,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T15:03:11.398Z","etag":null,"topics":["compression","javascript","lzjb"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/copy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-18T18:52:36.000Z","updated_at":"2024-12-02T14:10:01.000Z","dependencies_parsed_at":"2022-09-06T03:42:39.779Z","dependency_job_id":null,"html_url":"https://github.com/copy/jslzjb-k","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copy%2Fjslzjb-k","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copy%2Fjslzjb-k/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copy%2Fjslzjb-k/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copy%2Fjslzjb-k/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/copy","download_url":"https://codeload.github.com/copy/jslzjb-k/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248465343,"owners_count":21108244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compression","javascript","lzjb"],"created_at":"2024-10-13T20:59:29.862Z","updated_at":"2025-04-11T19:09:46.935Z","avatar_url":"https://github.com/copy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jslzjb-k\n=\n\nThis is a fork of the jslzjb project, https://code.google.com/p/jslzjb/\n\nIt has been modified to work on `Uint8Array` values exclusively and avoids all\nallocations during compression and decompression. These changes have been made\nout of the need to compress large buffers in a reasonable amount of time.\n\nIt performs compression of a 100 MB buffer in the order of a second.\n\nTest it yourself:\n\n```\n% ./test-lzjb.js test-lzjb.js\ncompress: 0.822ms\ndecompress: 0.281ms\ncompressed test-lzjb.js from=905 to=659\n% ./test-lzjb.js /bin/node\ncompress: 106.155ms\ndecompress: 55.874ms\ncompressed /bin/node from=14059k to=9348k\n```\n\nTwo methods are exported:\n\n```javascript\n/**\n  * Compress byte array using fast and efficient algorithm.\n  *\n  * @param {Uint8Array} sstart  The buffer to compress\n  * @param {Uint8Array} dstart  The buffer to write into\n  * @return {number} compressed length (number of bytes written to the\n  *                  output buffer). May be bigger than the size of the\n  *                  output buffer, in which case some bytes are lost\n  */\njslzjb.compress = function(sstart, dstart)\n\n/**\n * Decompress byte array using fast and efficient algorithm.\n *\n * @param {Uint8Array} sstart  The buffer to decompress\n * @param {number} slen  compressed length\n * @param {Uint8Array} dstart  The buffer to write into\n * @return {number} decompressed length\n */\njslzjb.decompress = function(sstart, slen, dstart)\n```\n\n**TODO**\n\n- Benchmarks\n- Make use of asm.js\n- Make use of simd\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopy%2Fjslzjb-k","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcopy%2Fjslzjb-k","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopy%2Fjslzjb-k/lists"}