#io #seek #subfile

subio

Read, write, and seek within a portion of a file as if it were itself a standalone file

2 unstable releases

Uses new Rust 2024

new 0.2.0 Feb 11, 2026
0.1.0 Feb 11, 2026

#4 in #seek

MIT license

11KB
242 lines

subio

Implementing IO traits on regions of IO-compatible types.

Use case

It is often convenient to read, write, and seek within a portion of a file as if it were itself a standalone file. For example, a tar or zip archive, which are a number of file entries concatenated together with some metadata.

subio does the (trivial) bookkeeping to allow that to happen, for standard traits std::io::Read, std::io::Write, std::io::Seek etc..

Extension

The provided types could be extended to support other IO traits like those provided by various async runtimes and io_uring.

No runtime deps