Skip to content

Conversation

@Databean
Copy link
Member

A lot of operations directly use file descriptor or file descriptor wrappers, that could benefit from an IO abstraction, which can abstract over useful operations:

  • Buffering of a backing source
  • Using in-memory data (especially in tests)
  • Reading from the network
  • Reading from zip files
  • Reading the contents of various disk file representations (composite, android-sparse, qcow)
  • Reading from compressed gzip/bzip2 streams

Additionally, it would be nice to expose pread and pwrite as first-class operations to have an alternative to managing the seek cursor.

A lot of operations directly use file descriptor or file descriptor
wrappers, that could benefit from an IO abstraction, which can abstract
over useful operations:

- Buffering of a backing source
- Using in-memory data (especially in tests)
- Reading from the network
- Reading from zip files
- Reading the contents of various disk file representations (composite, android-sparse, qcow)
- Reading from compressed gzip/bzip2 streams

Additionally, it would be nice to expose
[`pread`](https://man7.org/linux/man-pages/man2/pread.2.html) and
[`pwrite`](https://man7.org/linux/man-pages/man2/pwrite.2.html) as
first-class operations to have an alternative to managing the seek
cursor.

Bug: b/480271687
@Databean Databean requested a review from jemoreira January 31, 2026 03:18
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.

1 participant