tweedegolf / sequential-storage

A crate for storing data in flash memory with minimal need for erasing pages
Apache License 2.0
87 stars 8 forks source link

Add check to see whether an item can fit on a page at all #51

Closed diondokter closed 2 months ago

diondokter commented 2 months ago

This example: https://github.com/cr1901/miniconf-sample/tree/main

The pages are only 16 bytes, so the given data doesn't fit. But it won't ever fit. Currently the crate concludes that the storage must be full. However, with an extra check this error can be improved.

Might also be worth it to document the overheads a little bit like the page states and the item header size.