Skip to content
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

Java library #33

Closed
cagnulein opened this issue Jun 23, 2015 · 6 comments
Closed

Java library #33

cagnulein opened this issue Jun 23, 2015 · 6 comments

Comments

@cagnulein
Copy link

Hi, thanks for your great work!
I would like to decompress the data generated by an embedded system on Java.
Have you got a ready-to-use solution?
Should i use a standard lzss java class?

Thanks

@silentbicycle
Copy link
Collaborator

I don't have an implementation I've checked for compatibility yet, sorry.

LZSS is a pretty standard algorithm, and most of the unique implementation details for heatshrink either have to do with working incrementally or specific heuristics in the encoder for which patterns are / aren't an improvement on literal output. The decoder does far less work than the encoder, and a blocking decoder implementation would be significantly simpler.

It's possible that a standard implementation will work, provided it uses 0b0 to tag back-references and 0b1 for literals, and not vice versa. The algorithm leaves some formatting choices like that as implementation details.

I may write an implementation eventually (which would be tested against the current library version), but I'd be happy to include an implementation with a compatible license.

@cagnulein
Copy link
Author

Ok thanks. In the meantine i'm compiling a dll version of your decoder in order to linking in Java.
I will let you know if it will ok.

@cagnulein
Copy link
Author

I confirm you that linking the c code compiled as a dll and linking it from java works like a charm.

@silentbicycle
Copy link
Collaborator

Fantastic. :)

I added issue #34, to have a compatible simple, blocking implementation as documentation, to make porting like this easier.

@markrileybot
Copy link

In case anyone is still interested, I started working on this today: https://github.com/markrileybot/heatshrink-java/

Decoding works fine. I'll write an encoder soon.

@markrileybot
Copy link

Java encoder/decoder complete

https://github.com/markrileybot/heatshrink-java/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants