| Crates.io | bookfile |
| lib.rs | bookfile |
| version | 0.3.0 |
| created_at | 2021-07-05 18:03:13.080081+00 |
| updated_at | 2021-07-13 22:45:41.715584+00 |
| description | A container file format with chapters and an index |
| homepage | |
| repository | https://github.com/ericseppanen/bookfile |
| max_upload_size | |
| id | 419107 |
| size | 38,831 |
This crate is still under development.
Bookfile allows creating a file in Book format, by writing sequential
chapters. A bookfile can be created in streaming mode, making it possible
to create a Bookfile while writing it into a network socket or other
streaming-only device. Any target supporting std::io::Write will work.
Each chapter contains a [u8] payload and is read independently.
The [Book] type represents a read-only Bookfile. Invividual chapters can
be read using the std::io::Read interface. Seek and read_at are
also provided, and work within the context of that chapter: the seek offset
is the offset within the chapter, and a read at the end of the chapter will
return EOF.
A chapter's offset, length, and id number are all kept in a Table of Contents stored at the end of the file. The TOC will be read when a Book is opened, but no chapters will be read until requested.
License: Apache-2.0