You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm currently working on porting a C program using liblzma over to Rust, and I'm using this library as a substitute for raw unsafe bindings, so thank you for your work on it.
Unfortunately I've encountered two issues thus far - neither of which are major, but make the porting process more difficult than it needs to be.
The first is simply that liblzma has LZMA_VLI_UNKNOWN, but I can't find a related value or setting in xz2. I suspect this is just a lack of understanding on my part or something I've missed, but I'd appreciate some clarification as to where I can set the Variable-Length Integer setting to Unknown in this lib. I haven't seen any VLI options, but I also haven't seen any documentation on the matter.
The second is that the program I'm working with basically just initializes the LZMA options with a preset value (0-9) and after loading the preset, queries the dictionary size on said options for use in other things (since this is set within liblzma by the preset itself, the only access I have to dict_size is this way).
Would it be possible and/or reasonable to expose option values through xz2 in case of situations such as these? The library has the dict_size method already, so I suspect it shouldn't be unreasonable to expect access to a variable one can set. My only alternative as a user of the library is to create some kind of reference table mapping preset to dict size, but that's clunky and leaves room for future bugs on LZMA version changes.
If this is a simple enough change I would be open to doing a PR for it myself, but I wanted to ask first in case there's something I'm missing or a specific reason why it isn't included.
Thank you again for your work on the library and your time,
Z
The text was updated successfully, but these errors were encountered:
Ayush1325
pushed a commit
to Ayush1325/xz2-rs
that referenced
this issue
Jul 29, 2024
Hi! I'm currently working on porting a C program using liblzma over to Rust, and I'm using this library as a substitute for raw unsafe bindings, so thank you for your work on it.
Unfortunately I've encountered two issues thus far - neither of which are major, but make the porting process more difficult than it needs to be.
The first is simply that liblzma has
LZMA_VLI_UNKNOWN
, but I can't find a related value or setting inxz2
. I suspect this is just a lack of understanding on my part or something I've missed, but I'd appreciate some clarification as to where I can set the Variable-Length Integer setting to Unknown in this lib. I haven't seen any VLI options, but I also haven't seen any documentation on the matter.The second is that the program I'm working with basically just initializes the LZMA options with a preset value (0-9) and after loading the preset, queries the dictionary size on said options for use in other things (since this is set within liblzma by the preset itself, the only access I have to
dict_size
is this way).Would it be possible and/or reasonable to expose option values through
xz2
in case of situations such as these? The library has thedict_size
method already, so I suspect it shouldn't be unreasonable to expect access to a variable one can set. My only alternative as a user of the library is to create some kind of reference table mapping preset to dict size, but that's clunky and leaves room for future bugs on LZMA version changes.If this is a simple enough change I would be open to doing a PR for it myself, but I wanted to ask first in case there's something I'm missing or a specific reason why it isn't included.
Thank you again for your work on the library and your time,
Z
The text was updated successfully, but these errors were encountered: