Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danieljdufour/fast-rle
Fast Run Length Encoder and Decoder
https://github.com/danieljdufour/fast-rle
rle rle-compression-algorithm run-length-decoding run-length-encoding
Last synced: about 20 hours ago
JSON representation
Fast Run Length Encoder and Decoder
- Host: GitHub
- URL: https://github.com/danieljdufour/fast-rle
- Owner: DanielJDufour
- License: cc0-1.0
- Created: 2020-06-02T22:37:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-21T12:56:41.000Z (over 1 year ago)
- Last Synced: 2024-10-13T14:16:28.970Z (24 days ago)
- Topics: rle, rle-compression-algorithm, run-length-decoding, run-length-encoding
- Language: JavaScript
- Size: 38.1 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fast-rle
Fast Run Length Encoder and Decoder# usage
## decoding
```javascript
import decode from 'fast-rle/decode';const encoded = [5, 3, 1, 8, 2, 0];
decode(encoded);
[3, 3, 3, 3, 3, 8, 0, 0]
```
## encoding
```javascript
import encode from 'fast-rle/encode';const nums = [3, 3, 3, 3, 3, 8, 0, 0];
encode(nums);
[5, 3, 1, 8, 2, 0]encode(nums, { chunk: true });
[ [3, 5], [8, 1], [0, 2] ]encode(nums, { max_run_length: 2 });
[2, 3, 2, 3, 1, 3, 1, 8, 2, 0]
```# support
Post an issue at https://github.com/danieljdufour/fast-rle