Skip to content

Commit

Permalink
Keep track of current nchunk when seting a slice (needed when applyin…
Browse files Browse the repository at this point in the history
…g prefilters)
  • Loading branch information
martaiborra committed Apr 18, 2024
1 parent 7611351 commit 24005ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blosc/b2nd.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,8 @@ int get_set_slice(void *buffer, int64_t buffersize, const int64_t *start, const
uint8_t *chunk = malloc(chunk_nbytes);
BLOSC_ERROR_NULL(chunk, BLOSC2_ERROR_MEMORY_ALLOC);
int brc;
// Update current_chunk in case a prefilter is applied
array->sc->current_nchunk = nchunk;
brc = blosc2_compress_ctx(array->sc->cctx, data, data_nbytes, chunk, chunk_nbytes);
if (brc < 0) {
BLOSC_TRACE_ERROR("Blosc can not compress the data");
Expand Down

0 comments on commit 24005ac

Please sign in to comment.