Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/limium/libans
Java implementation of ANS
https://github.com/limium/libans
ans asymmetric-numeral-systems java library
Last synced: 15 days ago
JSON representation
Java implementation of ANS
- Host: GitHub
- URL: https://github.com/limium/libans
- Owner: LiMium
- License: lgpl-3.0
- Created: 2018-02-03T15:53:18.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-06T18:54:08.000Z (almost 7 years ago)
- Last Synced: 2024-11-05T12:22:16.744Z (2 months ago)
- Topics: ans, asymmetric-numeral-systems, java, library
- Language: Java
- Size: 19.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# lib ANS
A pure Java implementation of
[ANS](https://en.wikipedia.org/wiki/Asymmetric_Numeral_Systems). Currently,
only the rANS variant has been implemented.ANS has time performance similar to Huffman coding, but its compression is as
efficient as Arithmetic coding. However, ANS requires more memory (O(N)) as
symbols need to be buffered and encoded in reverse order of their appearance.
The encoded stream also needs to be reversed, requiring temporary storage, but
that should not take up a lot of space (due to compression).# Design
This library uses an abstract Symbol Statistics interface, thus providing full
cusomtization. Some example Statistical implementations are in the tests.# Status
The current focus is on stability. The code has been well tested (see test/),
but consider it beta quality as of now.Future ideas:
* Use a dynamically growing stack
* (optimisation) : Avoid division in encoder by using "reciprocals", ala Alverson# License
LGPL3 (See LICENSE.txt)
# Credits
* Jarek Duda who invented ANS
* Code inspiration from https://github.com/rygorous/ryg_rans