On Mon, Jun 29, 2020 at 12:42 PM Francesc Alted <
fal...@gmail.com> wrote:
>
> Ups, stupid of me.
>
> On Mon, Jun 29, 2020 at 8:21 PM Brent Pedersen <
bped...@gmail.com> wrote:
>>
>> Hi Francesc,
>> I have been top-posting (shame on me). So my latest question was actually:
>>
>> For just blosc2_contexts, I can see how to get the size of a
>> compressed block and set my output size accordingly:
>>
https://github.com/brentp/blosc2-nim/blob/2efd19807cb52f71280c7d9ffa345c87e489101b/src/blosc2.nim#L302
>>
>> however, I don't see how to get the uncompressed size if my data is in
>> chunk_i within a (frame-backed) schunk. I see that given a frame-backed schunk,
>> I can't access schunk->data directly. Is there an API function or
>> example I am missing?
>
>
> If I understand you correctly, you can use `blosc_cbuffer_sizes()` for getting the uncompressed size. This is `nbytes` in the docstrings:
>
>
https://github.com/Blosc/c-blosc2/blob/master/blosc/blosc2.h#L527-L544
>
> Of course, you need first to access the chunk from the frame via [blosc2_schunk_get_chunk](
https://github.com/Blosc/c-blosc2/blob/master/blosc/blosc2.h#L964-L982).
>
> Does this help?
> Francesc
>
Yes, this works. Thank you.
I just want to clarify one more thing. You noted that a caterva
container must be of a homogeneous type (well, or at least size).
Is this true of a frame also? I thought that I might add an int32
superchunk, followed by an int64 superchunk, but I get an error with
that.
So, just to verify, I'll need a separate frame for each data size,
correct? e.g. a 4 byte frame and an 8 byte frame for int32,float32 and
int64 and float64,
respectively, yes?
thanks again for your help, and the software. I have something that
mostly works now.
-Brent
> To view this discussion on the web visit
https://groups.google.com/d/msgid/blosc/CAFrp1voRQDoKtg8mWVzD9y6FQegoM5rScrQZkCwD%3DXKAwNJ4Zg%40mail.gmail.com.