-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Tamp (low-memory intended for embedded targets) #135
base: master
Are you sure you want to change the base?
Conversation
It cannot decompress it's own 'files'. |
Can you elaborate? What issues are you seeing?
This is intentional, in Tamp levels below 8 are invalid. This is why I have the range begins at |
It seems to not be able to correctly decompress compressed data. Lzbench check correctness of decompressed result and if it differs from original then it indicates error.
|
I know it's not a great response, but it works fine on my M1 macos machine :D I'll try and replicate when I get my hands on my linux box in a week. |
I just ran this on a 64 bit linux machine without issues:
I then cross-compiled it for 32-bit:
Investigating what the cause could be. |
@tansy this should be fixed now by 2a9d7d9. The issue was that I was pointing at the reported size |
Yes, it works now. |
What's the rationale behind that? |
With tamp, the compression level directly corresponds to the window size. Tamp's header uses 3 bits to represent the window size:
For the API, it was decided that the user should just provide values in range |
It may be more meaningful to you but not neccesarily to average user, who doesn't (even) know what the sliding window is. |
Tamp doesn't perform any allocations, so the user must provide the window buffer. It is much more natural to do:
rather than
In this PR, we could change the range expressed by lzbench to something like |
Tamp is a low-memory, DEFLATE-inspired lossless compression library intended for embedded targets. Tamp is intended for situations where previous heatshrink was used. Tamp offers higher compression ratios, better tooling, better API, small firmware, and a small memory footprint (barely larger than the window buffer). Tamp has an easy to install CLI, python library, and C implementation.
The design priorities (in order) of Tamp is:
Here's an example output from running the following on a M1 macbook air; typical use-case is level
10
: