blob: 325c0b28386d5def0d8afa8f4ad0d939db9b2cf9 [file] [log] [blame]
Wyatt Heplerf9fb90f2020-09-30 18:59:33 -07001.. _module-pw_blob_store:
David Rogers2d195022020-07-16 14:07:47 -07002
3-------------
4pw_blob_store
5-------------
6``pw_blob_store`` is a storage container library for storing a single blob of
7data. Blob_store is a flash-backed persistent storage system with integrated
8data integrity checking that serves as a lightweight alternative to a file
9system.
10
11Write and read are only done using the BlobWriter and BlobReader classes.
12
David Rogers17793d62021-02-05 03:29:02 -080013Once a blob write is closed, reopening for write followed by a Discard(), Write(), or
David Rogers2d195022020-07-16 14:07:47 -070014Erase() will discard the previous blob.
15
16Write blob:
17 0) Create BlobWriter instance
18 1) BlobWriter::Open().
19 2) Add data using BlobWriter::Write().
20 3) BlobWriter::Close().
21
22Read blob:
23 0) Create BlobReader instance
24 1) BlobReader::Open().
25 2) Read data using BlobReader::Read() or
Yecheng Zhao4a6deb42021-09-01 15:23:00 -070026 BlobReader::GetMemoryMappedBlob(). BlobReader is seekable. Use
27 BlobReader::Seek() to read from a desired offset.
David Rogers2d195022020-07-16 14:07:47 -070028 3) BlobReader::Close().
29
David Rogers17793d62021-02-05 03:29:02 -080030Size report
31-----------
32The following size report showcases the memory usage of the blob store.
33
34.. include:: blob_size
35
36
David Rogers2d195022020-07-16 14:07:47 -070037.. note::
38 The documentation for this module is currently incomplete.