forked from Imagelibrary/littlefs
Added lfs_rbyd_rangesize (untested), some cleanup
Toying around with the idea that since rbyd trees have strict height gaurantees after compaction (2*log2(n)+1), we can proactively calculate the maximum on-disk space required for a worst case tree+leb128 encoding. This would _greatly_ simplify things such as metadata compaction and splitting, and allow unstorable file metadata (too many custom attributes) to error early. One issue is that this calculated worst case will likely be ~4-5x worst than the actual encoding due to leb128 compression. Though this may be an acceptable tradeoff for the simplification and more reliable behavior.
This commit is contained in:
@@ -53,7 +53,7 @@ def tagrepr(tag, size, off=None):
|
||||
type = tag & 0x7fff
|
||||
suptype = tag & 0x7807
|
||||
subtype = (tag >> 3) & 0xff
|
||||
id = (tag >> 15) & 0xffff
|
||||
id = ((tag >> 15) & 0xffff) - 1
|
||||
|
||||
if suptype == 0x0800:
|
||||
return 'mk%s id%d%s' % (
|
||||
|
||||
Reference in New Issue
Block a user