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

There is no API for providing **kwargs to Compressor.decompress #1684

Open
braingram opened this issue Nov 15, 2023 · 0 comments
Open

There is no API for providing **kwargs to Compressor.decompress #1684

braingram opened this issue Nov 15, 2023 · 0 comments

Comments

@braingram
Copy link
Contributor

As discussed here:
braingram/asdf-compression#1 (comment)

Compressor.decompress accept **kwargs:

def decompress(self, data, out, **kwargs):

These are provided during compression.decompress (passed in from the config argument):

len_decoded = decoder.decompress(blocks, out=buffer.data, **config)

However config is not defined during block decompression:

data = mcompression.decompress(fd, used_size, header["data_size"], compression)

To propose a possible solution (to start the conversation) it might be possible to specify decompression_kwargs either per-block or per-codec/label. Something like the following:

asdf.open('test.asdf', decompression_kwargs={0: {...}, 'lz4': {...}, ...})
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

1 participant