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

Encode all unable to use 'f32' or 'f16' formats #3

Closed
HeatPhoenix opened this issue Feb 11, 2022 · 2 comments
Closed

Encode all unable to use 'f32' or 'f16' formats #3

HeatPhoenix opened this issue Feb 11, 2022 · 2 comments

Comments

@HeatPhoenix
Copy link

Hi,

In line 148 of the file encode.py, you seem to have made a small error in the sense that you initialize a default ValuesEncoder. This means that if you are trying to do encoding in a different format (say 'f32') this will be superceded by the default. In other words, this means that in the current pip implementation of gorillacompression it is impossible to do anything but 'f64' compression unless you use encode_next manually.

Simple fix would be to initialize that value encoder in that function using the values from "self.". (Alternatively, I can make a pull request).

Regards,
Zack

@ghilesmeddour
Copy link
Owner

Hi @HeatPhoenix,

I understand what you mean, encode_all encodes f64 by default and does not allow you to choose a different encoding. Thanks for bringing this up.

We can't use self because encode_all is static, but we can add float_format parameter to encode_all.

@ghilesmeddour
Copy link
Owner

@HeatPhoenix I have just published a new release with the fix

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

2 participants