snakehand / heatshrink Goto Github PK
View Code? Open in Web Editor NEWMinimal no_std implementation of Heatshrink compression & decompression
License: Other
Minimal no_std implementation of Heatshrink compression & decompression
License: Other
The LICENSE file in the git repository states that the software is under "BSD 2-Clause License".
However the Cargo.toml file of the project (the one used in crates.io) states that the license is ""MIT OR Apache-2.0"".
Which is right?
This discrepancy needs to be resolved.
The API for the RUST version of heatshrink differs quite a bit from the philosophy of the C version.
With the C API you can implement a streaming algorithm where data is processed chunk by chunk (think network packet) and you can therefore compress or uncompress data without having to allocate memory for the whole image. For example on one side you can receive data as a stream of network packets, compress or uncompress each packet and then write the resulting data to storage media as list of individual blocks.
This is not possible with the current RUST API which expect the source and the destination to be 2 memory blocks big enough to contain the all data image. It is therefore not possible to process the data on the go as it needs to be processed at once.
Do you intend to provide some other API more compatible with streaming scenarios which seems to make a lot of sense for embedded targets with limited amount of memory?
Obviously the current API is quite simple (compared to a streaming API) but it seems that it requires memory resources that might be missing to embedded targets.
Hi!
I have issues compressing larger files (400kB and upwards).
Again, I compared the results with the C-library, and even a ~800kB file compresses just fine. I used the test files below (some e-book files), and I can observe that compression time increases a lot. Can you observe this behavior too?
Thank you again and greetings,
Christian
Hi!
I wanted to use this library for decoding heatshrink compressed data. However, I was always getting an IllegalBackref error.
I decided to compare the encoding and decoding using the CLI (https://github.com/atomicobject/heatshrink) and the test data of the alpha
test.
So I guess something is wrong with the encoding? In both cases, a window size of 11 and a lookahead of 4 is used.
Result using CLI with same data:
Maybe you can tell me what I made wrong.
Regards, Christian
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.