Skip to content

implemented zfp codec - #89

Open
konstibob wants to merge 3 commits into
zarr-developers:mainfrom
konstibob:feat/zfp_codec
Open

implemented zfp codec#89
konstibob wants to merge 3 commits into
zarr-developers:mainfrom
konstibob:feat/zfp_codec

Conversation

@konstibob

@konstibob konstibob commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

added zfp codec which should work with seperatley configured zfp-java repository which for https://zfp.readthedocs.io

konstibob and others added 3 commits August 13, 2026 16:59
The promoted-buffer size was computed as
`(int) Zfp.countValues(zfpShape) * zfpType.getByteCount()`, so the
multiplication happened in int and silently wrapped for large chunks.
A 1024^3 int8 chunk wrapped to 0 and `promote` then threw
BufferOverflowException outside the try/catch; a 512x1024x1024 chunk
wrapped to Integer.MIN_VALUE and `allocate` threw IllegalArgumentException.

Compute the size as a long and reject oversized chunks with a
ZarrException before allocating.

Co-Authored-By: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants