Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

LZMA support #48

Open
XVilka opened this issue Aug 17, 2018 · 8 comments
Open

LZMA support #48

XVilka opened this issue Aug 17, 2018 · 8 comments

Comments

@XVilka
Copy link
Contributor

XVilka commented Aug 17, 2018

Since it seems that ocaml-lzma is dead https://forge.ocamlcore.org/projects/ocaml-lzma/ and there are no libraries that provide a way to do that, it make sense to support it here too.

@cfcs
Copy link
Contributor

cfcs commented Oct 22, 2018

ocaml-lzma and most of the other "OCaml" libraries that deal with compression that I've encountered so far (apart from decompress) are simply thin bindings to C implementations, so it is not just a simple case of salvaging the old OCaml code; you have to rewrite the compression/decompression algorithms from scratch. :(

Do we have a list of use cases where a LZMA implementation could come in handy?

@XVilka
Copy link
Contributor Author

XVilka commented Oct 22, 2018

@cfcs I was using Ctypes bindings to the liblzma until I realized (by pain and blood) that xz-utils are not thread safe and crash all the time. Then I switch to writing OCaml bindings for LZMA SDK from 7zip, but those are a mess do deal with (mainly by API sense). I even searched for Rust implementation of LZMA (to wrap in OCaml bindings) but it turned out incomplete and unusable: https://github.com/meh/rust-lzma

@cfcs
Copy link
Contributor

cfcs commented Oct 22, 2018

Right, but where is LZMA needed?

@XVilka
Copy link
Contributor Author

XVilka commented Oct 30, 2018

This compression format is very popular.

@dinosaure
Copy link
Member

I put it (a long time ago) in my TODO list. Currently, I need to finish some side projects but I will clearly take care about that soon precisely because I need:

  1. rewrite some parts of decompress
  2. make a release of it with gzip support
  3. optimize process

@XVilka
Copy link
Contributor Author

XVilka commented Nov 15, 2019

Here is the good reference in a closer (to OCaml) language (Rust) - https://github.com/gendx/lzma-rs/tree/master/src/decode

@XVilka
Copy link
Contributor Author

XVilka commented Mar 26, 2020

I have a simple bindings for 7-Zip SDK in OCaml, might be some source of information too, especially regarding some arcane peculiarities: https://github.com/XVilka/ocaml-lzma_7z

@XVilka
Copy link
Contributor Author

XVilka commented Jun 17, 2020

In case there will be some interest, there are some test files to check against: https://github.com/xz-mirror/xz/tree/master/tests/files

@dinosaure dinosaure reopened this Sep 10, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants