blob: 906d94295b0f1be2669ef557173f6f06006ab3f5 [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
26 BlobReader::GetMemoryMappedBlob().
27 3) BlobReader::Close().
28
David Rogers17793d62021-02-05 03:29:02 -080029Size report
30-----------
31The following size report showcases the memory usage of the blob store.
32
33.. include:: blob_size
34
35
David Rogers2d195022020-07-16 14:07:47 -070036.. note::
37 The documentation for this module is currently incomplete.