Skip to content

Maint decoders - #724

Open
AhmetNSimsek wants to merge 6 commits into
mainfrom
maint_decoders
Open

Maint decoders#724
AhmetNSimsek wants to merge 6 commits into
mainfrom
maint_decoders

Conversation

@AhmetNSimsek

Copy link
Copy Markdown
Collaborator

This PR refactors retrieval decoders to support both file- and byte-based decoding.

Key changes:

  • Introduces a Decoder abstraction with FILE and BYTES input modes.

  • Allows decoders to define kwargs passed to the underlying reader.

  • Adds explicit gzip handling:

    • native support when provided by the reader
    • cached decompression otherwise
  • Preserves meaningful file suffixes in cache filenames.

  • Moves path-capable formats such as NIfTI, GIFTI, FreeSurfer annotations, HDF5/NWB, NumPy, and tabular data to file-based decoding where appropriate.

  • Removes unnecessary file → bytes → file roundtrips and enables file-backed/lazy access where supported.

  • Keeps find_suitable_decoder() as a backwards-compatible wrapper around Decoder.from_filename().

Custom func= callbacks retain the existing byte-based behaviour.

@AhmetNSimsek AhmetNSimsek self-assigned this Aug 28, 2026
@AhmetNSimsek AhmetNSimsek added the maintenance Not a bug or breaking issue. Code maintenance related. label Aug 28, 2026
@AhmetNSimsek AhmetNSimsek mentioned this pull request Sep 1, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Not a bug or breaking issue. Code maintenance related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant