Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avojak/integer-compression
Demonstrates several methods of integer compression
https://github.com/avojak/integer-compression
binary-encoding delta-encoding gamma-encoding integer-compression integer-encoding unary-encoding
Last synced: 22 days ago
JSON representation
Demonstrates several methods of integer compression
- Host: GitHub
- URL: https://github.com/avojak/integer-compression
- Owner: avojak
- License: mit
- Created: 2019-09-08T03:23:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-08T17:41:08.000Z (over 5 years ago)
- Last Synced: 2024-12-08T08:27:51.553Z (26 days ago)
- Topics: binary-encoding, delta-encoding, gamma-encoding, integer-compression, integer-encoding, unary-encoding
- Language: Python
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# integer-compression
Demonstrates several methods of integer compression:
- binary
- unary
- gamma
- delta## Usage
### Compression
```
usage: compress [-h] M NCompress an integer.
positional arguments:
M the compression method
N the integer to compressoptional arguments:
-h, --help show this help message and exit
```For example:
```
$ ./compress gamma 3
101
$ ./compress gamma 5
11001
```### Decompression
```
usage: decompress [-h] M CDecompress an integer.
positional arguments:
M the compression method used
C the compressed integer to decompressoptional arguments:
-h, --help show this help message and exit
```For example:
```
$ ./decompress gamma 101
3
$ ./decompress gamma 11001
5
```## Additional
Here's a link to my blog post about the various encoding methods: https://blog.avojak.com/2019/09/08/integer-compression/