https://github.com/zacanger/shrink-string
Tiny string compression module for Node.
https://github.com/zacanger/shrink-string
compress compression shrink string
Last synced: about 1 month ago
JSON representation
Tiny string compression module for Node.
- Host: GitHub
- URL: https://github.com/zacanger/shrink-string
- Owner: zacanger
- License: mit
- Created: 2018-12-15T02:24:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T16:26:05.000Z (11 months ago)
- Last Synced: 2025-03-24T01:35:58.454Z (about 2 months ago)
- Topics: compress, compression, shrink, string
- Language: JavaScript
- Homepage: http://npm.im/shrink-string
- Size: 896 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# shrink-string
Tiny string compression module for Node.
[Donate](https://ko-fi.com/zacanger)
--------
## Installation
`npm i shrink-string`
## Usage
```javascript
const { compress, decompress } = require('shrink-string')// `compress` takes a unicode string and returns a base64 string
// `decompress` takes that base64 string and returns the original unicode stringconst thing = async (s = '') => {
const shrunk = await compress(s)
const expanded = await decompress(shrunk)
assert(s === expanded)
}
```Thanks to [MrlolDev](https://github.com/MrlolDev) for adding TypeScript support.
[LICENSE](./LICENSE.md)