Blosc / Blosc/c-blosc2

`chunksize == 0`

Open
#367 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
584
Forks
112
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

I'm puzzled by `chunksize == 0` in this piece of code:
https://github.com/Blosc/c-blosc2/blob/b2434ad1be6ea46e101e0691bfd6b2a43174cc8a/blosc/frame.c#L2424-L2426

* if `chunksize == 0`, then `chunk_nbytes < (size_t)chunksize)` is equivalent to `chunk_nbytes < 0)`
* `chunksize == 0` does not seem consistent with the `Check that we are not appending a small chunk after another small chunk` comment, but I may be wrong here.

Contributor guide

Open the contributing guide

Research direction

Start by reading frame.c at lines 2424-2426 and trace how chunksize and chunk_nbytes are set before this check. Determine whether chunksize == 0 is valid there and whether the condition matches its comment; done means the behavior and explanation are consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.