{"_id":"@amoutonbrady/lz-string","_rev":"4-b1b7568b55b107a18cd97e414514a92c","name":"@amoutonbrady/lz-string","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"@amoutonbrady/lz-string","version":"0.0.1","keywords":["lz-string"],"author":{"name":"Alexandre Mouton-Brady"},"license":"MIT","_id":"@amoutonbrady/lz-string@0.0.1","maintainers":[{"name":"amoutonbrady","email":"amoutonbrady@gmail.com"}],"homepage":"https://github.com/amoutonbrady/lz-string#readme","bugs":{"url":"https://github.com/amoutonbrady/lz-string/issues"},"dist":{"shasum":"f131cfbf0dfe3b73c8b7bd58c8e4c8fef7374f67","tarball":"https://registry.npmjs.org/@amoutonbrady/lz-string/-/lz-string-0.0.1.tgz","fileCount":5,"integrity":"sha512-crH4ovRiiTg9y1lDTEtMwTdD4s/aYoz4EemUD3p+9GvHMOeJ3tUXQ/DQM1Mw9/wc9Od4jG97w0m9+gZmLysGFQ==","signatures":[{"sig":"MEUCIB8O04zqi5BbUuEAzHgJ9BThNtdy+R4zLw8sSyhkI/ycAiEArLe62rS3q4aHBxkFsnhgj81H7yT9ARNrAJb87Egwmbk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD0HmCRA9TVsSAnZWagAAndUQAIESSimxdNxI0S1Q+/xF\nSTe+4y0IbEwGto1TIqa7NnJznCM4X64SviLNlJQEruGUYG51SfgbEJs/aPQq\njAKHvv7vXWdbPHJraTMevNz5FrOWiTbn0S0THHmMdZad6JZ8BdJqfHtATnxI\n7N6rwhkd8sjDQT31HL2OKHPn/vOF4O3mG2ZQAJ2T1Kru3TFvOxthL/X/MQFX\nQCAYbe5MBeIyTFaJvuoXVex6SliUaXeqEJm3hXoOOXXsvALpH8RF7WuWW1Ye\nhCfUGdaxH2fU1n3OEK48hyig9/r9c2SZWlpjSdAdHlWm2yqKXvI5iMwynC95\n/pbS59fyrQHRCjyWiMr7YbdNgga1I36G0G3Bqyv4vM2n/2SJLFNo8adPRej9\nagw862NyaKbQZhqZ1URf8V9lxpPdEiVXPElqqQmN1k4mojx6rZOetNjWNY1f\nkEd8KcJH0N9VMN2F6UzKDBSQbYikLVc27NFHm8cTk2nVmBJjFnMMi8bjmTCX\ntAc8Qi3dCKrBM/hg4yIJM0Z2aXBsN2AiOdZH8h09gVsgX77zZvD5mK9BelrK\ncpy/I+I68SEtgUbt7CLvIugdvCr0K5DIy5sqw3lRhW8ADswRA1+VZlMWZL99\nAbB0NyyDLp8OWhPCWvC2wA8uo9O8QOCVhMBLRxhPHJq825kt1N5p/x0iuPG4\nAr9Y\r\n=v0nH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","unpkg":"dist/esm/index.js","module":"dist/esm/index.js","browser":"dist/esm/index.js","exports":{"import":"./dist/esm/index.js","browser":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"gitHead":"21cc6ded3814e2057532112f3ea1c2264b9a3c4a","private":false,"scripts":{"test":"jiti tests/index.spec.ts","build":"del dist && jiti ./build.ts && tsc","prepublishOnly":"pnpm build && pnpm test && package-check"},"_npmUser":{"name":"amoutonbrady","email":"amoutonbrady@gmail.com"},"repository":{"url":"git+https://github.com/amoutonbrady/lz-string.git","type":"git"},"_npmVersion":"7.4.0","description":"Modern port of LZ-String","directories":{},"sideEffects":false,"_nodeVersion":"15.6.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"uvu":"^0.5.1","jiti":"^1.3.0","del-cli":"^3.0.1","esbuild":"^0.8.34","prettier":"^2.2.1","typescript":"^4.2.0-beta","@skypack/package-check":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/lz-string_0.0.1_1611612645760_0.6695659252657697","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@amoutonbrady/lz-string","version":"0.1.0","keywords":["lz-string"],"author":{"name":"Alexandre Mouton-Brady"},"license":"MIT","_id":"@amoutonbrady/lz-string@0.1.0","maintainers":[{"name":"amoutonbrady","email":"amoutonbrady@gmail.com"}],"homepage":"https://github.com/amoutonbrady/lz-string#readme","bugs":{"url":"https://github.com/amoutonbrady/lz-string/issues"},"dist":{"shasum":"492dae49c01cfa797f4c6f15871a5f488e54444a","tarball":"https://registry.npmjs.org/@amoutonbrady/lz-string/-/lz-string-0.1.0.tgz","fileCount":5,"integrity":"sha512-WsUuFexe01PUHKD8SUdiV3OQmauZWKyoo/7bJx3pj1l5SxLSe5//l1nQcU3DJlYL4JnhA8SqImT0/1xgUt6k5g==","signatures":[{"sig":"MEUCIQD/6RBhELW1WT3LGpHqMvseRpibdWSclALiKWC+OxnXRAIgUZtWB7+zyLe98vEq1Td2iqgCRru9FzoR/rxxZyK89sk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkC1bPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoi1Q//f+RfZMB7snq89ivEwRRcSx6M5wtn1+Tg+89VUd6LMOwDpgz/\r\nTD5mh07q4EJXA2gVSpDsx8CGKN7uz+0LPPglwQVdrGvbl0cEX/nWR79jmVFt\r\ngA6CyNFfeuI3s2hWQvCsY0HmQmd7nKQWHjXVn9KWKYamreth83VKyxDd1Yo7\r\nwentlLGrV9sQL9WlQYOogRBSNGqs7LE1EWvCG257Lju56Bt01c8IEdz6gRl5\r\nc+uP67KumaejPjqZ2OIhngMDeLdFPxMd7Xn3WtdACUgeuLaVeGzP9/VW2pY/\r\nQj8gTN3uoWbLKg9vpxu5CArS1PPA1ndaaoilqXvY4WdXJpIPkBLwA1vKB3Pn\r\nd97jjM7L8GfKogpCZuOrCO3qUogZ+0IZ0BFkoxL0SqC1oCn5Q8Okohvqsokd\r\nhqZzL5RPa+EauwiPHpOcaQpWsk4rN2L30yoEmjV1E+JuXlZS25KcgA2nyTex\r\n4MF88yxl2eFtmKlAt+RHoGErvWWc3tEllgwNKe4VTWfm2yzuuDcpCEsfWTeO\r\nuXyhS8LCgZTBP2fka9iAoy78kmLpHvNEADdElQNjJxfS1HUZVA1qSpw/sVz1\r\n2Xl8V49sH8VzHjGnc5JA9ELoVrcoD5uxE7Y/QWYaKPY3g3OLQl8UD0d2osjM\r\n1z1ZFZb8UYaPA1d8LOQMDw4yOXcvy/rszM8=\r\n=6Ed6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","_from":"file:amoutonbrady-lz-string-0.1.0.tgz","types":"dist/types/index.d.ts","unpkg":"dist/esm/index.js","module":"dist/esm/index.js","browser":"dist/esm/index.js","exports":{"import":"./dist/esm/index.js","browser":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"private":false,"scripts":{"test":"jiti tests/index.spec.ts","build":"del dist && jiti ./build.ts && tsc"},"_npmUser":{"name":"amoutonbrady","email":"amoutonbrady@gmail.com"},"_resolved":"/private/var/folders/26/2lz6ztbx3cd8m_84651nm0tr0000gn/T/e639ccf89efb667ce12eb536f53c6c1c/amoutonbrady-lz-string-0.1.0.tgz","_integrity":"sha512-WsUuFexe01PUHKD8SUdiV3OQmauZWKyoo/7bJx3pj1l5SxLSe5//l1nQcU3DJlYL4JnhA8SqImT0/1xgUt6k5g==","repository":{"url":"git+https://github.com/amoutonbrady/lz-string.git","type":"git"},"_npmVersion":"8.19.3","description":"Modern port of LZ-String","directories":{},"sideEffects":false,"_nodeVersion":"16.19.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"uvu":"^0.5.6","jiti":"^1.17.2","del-cli":"^5.0.0","esbuild":"^0.17.11","prettier":"^2.8.4","typescript":"5.0.0-beta","@skypack/package-check":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/lz-string_0.1.0_1678464719642_0.33164844920848147","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@amoutonbrady/lz-string","version":"0.2.0","description":"Modern TypeScript port of lz-string: LZ-based compression for JavaScript strings","type":"module","sideEffects":false,"license":"MIT","author":"Alexandre Mouton-Brady","repository":{"type":"git","url":"git+https://github.com/amoutonbrady/lz-string.git"},"homepage":"https://github.com/amoutonbrady/lz-string#readme","bugs":"https://github.com/amoutonbrady/lz-string/issues","keywords":["lz-string","lz","compression","compress","decompress","base64","utf16","uint8array","typescript"],"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.cts","engines":{"node":">=20"},"publishConfig":{"access":"public","provenance":true},"devDependencies":{"@arethetypeswrong/core":"^0.18.5","@types/node":"^26.4.1","lz-string":"^1.5.0","prettier":"^3.9.6","publint":"^0.3.24","tsdown":"^0.23.0","typescript":"^7.0.2"},"scripts":{"build":"tsdown","test":"node --test \"tests/**/*.test.ts\"","typecheck":"tsc --noEmit","format":"prettier --write .","format:check":"prettier --check .","check":"pnpm typecheck && pnpm test && pnpm build"},"_id":"@amoutonbrady/lz-string@0.2.0","dist":{"integrity":"sha512-QTulRZhJnXmo6yyknjFuWpZIxp98AStw0TbY9hwYIvPscX6N3ON55Tw46YP0NxPEMRrr8QroKPyrLUsJGj6KkA==","shasum":"f90c6458490636ca88548bc80114963bfb41bf0b","tarball":"https://registry.npmjs.org/@amoutonbrady/lz-string/-/lz-string-0.2.0.tgz","fileCount":7,"unpackedSize":20223,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDioUP/RPIsy2fr1R4Fa9HVzQAt5zKc3zwdZbyVIKH2GAIhAMeHLNL5km/6nbKtgQ/joollbNR7QgDE2exhOiJBtc0w"}]},"_npmUser":{"name":"amoutonbrady","email":"amoutonbrady@gmail.com"},"directories":{},"maintainers":[{"name":"amoutonbrady","email":"amoutonbrady@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lz-string_0.2.0_1788710475142_0.8186169696643646"},"_hasShrinkwrap":false}},"time":{"created":"2021-01-25T22:10:45.619Z","modified":"2026-09-06T16:01:15.478Z","0.0.1":"2021-01-25T22:10:45.880Z","0.1.0":"2023-03-10T16:11:59.788Z","0.2.0":"2026-09-06T16:01:15.325Z"},"bugs":"https://github.com/amoutonbrady/lz-string/issues","author":"Alexandre Mouton-Brady","license":"MIT","homepage":"https://github.com/amoutonbrady/lz-string#readme","keywords":["lz-string","lz","compression","compress","decompress","base64","utf16","uint8array","typescript"],"repository":{"type":"git","url":"git+https://github.com/amoutonbrady/lz-string.git"},"description":"Modern TypeScript port of lz-string: LZ-based compression for JavaScript strings","maintainers":[{"name":"amoutonbrady","email":"amoutonbrady@gmail.com"}],"readme":"# @amoutonbrady/lz-string\n\nModern TypeScript port of [lz-string](https://github.com/pieroxy/lz-string), the LZ-based\ncompression algorithm for JavaScript strings.\n\n- Wire-compatible with lz-string 1.x: anything compressed by one decompresses with the other\n  (verified against the reference implementation in the test suite).\n- Same API, fully typed, ESM and CommonJS builds, zero dependencies, tree-shakeable.\n- About half the source of the original: the bit reader/writer is shared instead of copy-pasted.\n\n## Install\n\n```bash\npnpm add @amoutonbrady/lz-string\n```\n\n## Usage\n\n```ts\nimport { compressToURL, decompressFromURL } from '@amoutonbrady/lz-string';\n\nconst compressed = compressToURL('hello world'); // safe to put in a query string as-is\nconst original = decompressFromURL(compressed); // 'hello world'\n```\n\n## API\n\nEvery `compress*` function returns `''` for `null`/`undefined`. Every `decompress*` function\nreturns `''` for `null`/`undefined`, `null` for an empty or corrupt input.\n\n| Compress                                          | Decompress                                                    | Output                                                        |\n| ------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |\n| `compress(input: string): string`                 | `decompress(input: string): string \\| null`                   | Raw UTF-16 code units, smallest but not safe to store as text |\n| `compressToUTF16(input: string): string`          | `decompressFromUTF16(input: string): string \\| null`          | Valid UTF-16, safe for `localStorage`                         |\n| `compressToBase64(input: string): string`         | `decompressFromBase64(input: string): string \\| null`         | Standard Base64                                               |\n| `compressToURL(input: string): string`            | `decompressFromURL(input: string): string \\| null`            | URL-safe alphabet (`+-$`), no padding, no encoding needed     |\n| `compressToUint8Array(input: string): Uint8Array` | `decompressFromUint8Array(input: Uint8Array): string \\| null` | Binary                                                        |\n\n`compressToURL` was named `compressToEncodedURIComponent` in the original library.\n\n## Development\n\n```bash\npnpm install\npnpm test       # node:test, runs the TypeScript sources directly\npnpm typecheck\npnpm build      # tsdown: ESM + CJS + .d.ts, then publint + arethetypeswrong\n```\n\nReleases: bump the version, push a `v*` tag. The `release.yml` workflow builds, tests and\npublishes to npm with provenance through npm trusted publishing (no token to manage).\n\n## License\n\nMIT\n","readmeFilename":""}