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

Random seek support #1

Open
maoe opened this issue Aug 16, 2015 · 6 comments
Open

Random seek support #1

maoe opened this issue Aug 16, 2015 · 6 comments

Comments

@maoe
Copy link
Contributor

maoe commented Aug 16, 2015

Do you have any plans to support random seek in this library? I've implemented it in https://github.com/maoe/lzma and am moderately interested in integrating it into your library.

@hvr
Copy link
Collaborator

hvr commented Aug 16, 2015

That's a bit awkward, I wasn't aware there was already a lzma lib in the works... why didn't you publish yours yet?

I wanted a lzma-library with minimal dependencies similiar to zlib and bzlib providing a common mid-level foundation for implementing adapters for streaming frameworks (I started with lzma-streams, and I was planning to implement lzma-pipes and lzma-machines as well). My motivation is that I'm investigating how to design streaming-framework independent primitives suitable to be used by conduit/pipes/machines/io-streams.

As I see you're already depending on pipes in your code... are you planning or interested in creating a lzma-pipes package?

As to random-seek support; I don't have any concrete plans as my focus has been streaming sequentially, but I'm interested in random seek support. I'll study your code to learn how you approached this problem.

@maoe
Copy link
Contributor Author

maoe commented Aug 16, 2015

why didn't you publish yours yet?

Because I was aiming to make it streaming-framework independent, but as you found, it's still using pipes.

I initially started with a custom stream type like you did in this library. But as I implemented the random seek support, I felt I was reinventing the pipes library. Also there was an immediate need for the library, so I just decided to use pipes. I wanted to factor out pipes related code to a separate package but I haven't gotten around to it yet.

are you planning or interested in creating a lzma-pipes package?

Yes, I guess. I'm also interested in machines as well but I'm not sure I have time.

Anyways, I think it would be nice to have random-seek support in this streaming-framework independent library. If it sounds fine to you, I'll give it a try.

@hvr
Copy link
Collaborator

hvr commented Aug 18, 2015

Anyways, I think it would be nice to have random-seek support in this streaming-framework independent library. If it sounds fine to you, I'll give it a try.

Sounds totally fine to me. I mostly care about a minimal build-depends footprint, so that lzma could be used by cabal or GHC w/o pulling in non-default packages.

@maoe
Copy link
Contributor Author

maoe commented Aug 18, 2015

I mostly care about a minimal build-depends footprint, so that lzma could be used by cabal or GHC w/o pulling in non-default packages.

Fair enough. I'll give it a try.

@utdemir
Copy link

utdemir commented Mar 17, 2019

I'm also in need of this feature, since I couldn't find any compression/decompression library with random seek support on Hakcage. I'd love to help, unfortunately I don't have enough knowledge on C FFI or liblzma; so I'm just putting this here just to say that there's some demand for this feature :).

@maoe
Copy link
Contributor Author

maoe commented Mar 18, 2019

@utdemir You can find working implementation in https://github.com/maoe/lzma. Incidentally I'm working on random seek support in Rust's liblzma binding. I may be able to work on the support in Haskell next.

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

No branches or pull requests

3 participants