kiyo-masui / bitshuffle

Filter for improving compression of typed binary data.
Other
215 stars 76 forks source link

Make inputs const #54

Closed dstndstn closed 7 years ago

dstndstn commented 7 years ago

Added a bunch of "const" qualifiers so that the top-level compress and decompress routines take const inputs. Also removed a check that the compiler complained is tautological, because unsigned int >= 0 by definition.

kiyo-masui commented 7 years ago

My one worry is that this constitutes an API change, which I'd like to avoid. That said I can't think of an example of user code that would break because of this, so maybe it is fine. Your thoughts?

dstndstn commented 7 years ago

I think it's a fairly harmless API change -- as you say, existing calls should still work without changing any client code, and I think it increases the value of the library because it guarantees to the client that the input memory won't be modified; client know they don't have to make a copy of the data or anything like that. But your code, your choice :)