Skip to content

Document zero-copy decoding input with memory-mapped files - #257

Merged
cpncf merged 1 commit into
mainfrom
docs_mmap_input
Aug 8, 2026
Merged

Document zero-copy decoding input with memory-mapped files#257
cpncf merged 1 commit into
mainfrom
docs_mmap_input

Conversation

@kpchoi

@kpchoi kpchoi commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Adds a "Zero-copy decoding input with memory-mapped files" section to the programmers guide.

The decoder only reads from the caller-owned bitstream buffer, so an application can map the input file into memory and pass pointers into the mapping directly instead of allocating a buffer and copying access units — no allocation, no copy, with the OS page cache doing demand paging and read-ahead. The section shows the pattern with POSIX (mmap) and Windows (CreateFileMapping/MapViewOfFile) pseudo code, notes that it applies to both decoding API sets, and points out the synergy with tile-based partial decoding, where only the pages of the tiles actually decoded are touched. Documentation only; no code change.

Follows up on the zero-copy input discussion in #228.

Signed-off-by: KP Choi <kp5.choi@samsung.com>

@cpncf cpncf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpncf
cpncf merged commit 640b3bd into main Aug 8, 2026
9 checks passed
@kpchoi
kpchoi deleted the docs_mmap_input branch August 8, 2026 05:32
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