Wyatt Hepler | f9fb90f | 2020-09-30 18:59:33 -0700 | [diff] [blame] | 1 | .. _module-pw_blob_store: |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 2 | |
| 3 | ------------- |
| 4 | pw_blob_store |
| 5 | ------------- |
| 6 | ``pw_blob_store`` is a storage container library for storing a single blob of |
| 7 | data. Blob_store is a flash-backed persistent storage system with integrated |
| 8 | data integrity checking that serves as a lightweight alternative to a file |
| 9 | system. |
| 10 | |
| 11 | Write and read are only done using the BlobWriter and BlobReader classes. |
| 12 | |
David Rogers | 17793d6 | 2021-02-05 03:29:02 -0800 | [diff] [blame] | 13 | Once a blob write is closed, reopening for write followed by a Discard(), Write(), or |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 14 | Erase() will discard the previous blob. |
| 15 | |
| 16 | Write blob: |
| 17 | 0) Create BlobWriter instance |
| 18 | 1) BlobWriter::Open(). |
| 19 | 2) Add data using BlobWriter::Write(). |
| 20 | 3) BlobWriter::Close(). |
| 21 | |
| 22 | Read blob: |
| 23 | 0) Create BlobReader instance |
| 24 | 1) BlobReader::Open(). |
| 25 | 2) Read data using BlobReader::Read() or |
| 26 | BlobReader::GetMemoryMappedBlob(). |
| 27 | 3) BlobReader::Close(). |
| 28 | |
David Rogers | 17793d6 | 2021-02-05 03:29:02 -0800 | [diff] [blame] | 29 | Size report |
| 30 | ----------- |
| 31 | The following size report showcases the memory usage of the blob store. |
| 32 | |
| 33 | .. include:: blob_size |
| 34 | |
| 35 | |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 36 | .. note:: |
| 37 | The documentation for this module is currently incomplete. |