Question about API design
With c-blosc v1.16.0 three new functions arrived:
blosc_decompress_unsafe()
blosc_decompress_ctx_unsafe()
blosc_getitem_unsafe()
blosc_cbuffer_validate()
I would like to build support for the unsafe versions of the decompress and getitem functions and I was wondering what the community might prefer in terms of API. Currently I see two options:
- Adding aptly named functions to the Python API, like
decompress_unsafeanddecompress_ptr_unsafe. - Adding a keyword argument
unsafe=False
What would you prefer? @FrancescAlted
After some more thought, it seems like, adding a keyword might be easier to implement than adding new functions.
Yes, I agree that the keyword approach sounds sensible. What about safe=True instead of unsafe=False? (double negation always takes a few more brain cycles to process ;)
O.K. for the time being, only unsafe decompression will be supported. It seems like python-blosc doesn't yet have support for getitem so that would have to be implemented first.
cbuffer_validate was merged with #186 and the unsafe decompression is implemented in #191
I think this has been done long time ago, so closing.