mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
4ddb5c586b
This commit adds a pair of encoder/decoder to take the advantage of the BigSize format when encoding an uint64 and possibly an uint32. Often the time an uint64 value is not big enough to fill all the 8 bytes, thus using BigSize can save extra bytes when save it to db. And for uint32, if we know most of the values do not exceed 65536, we can also save at least 1 byte using BigSize format. This commit introduces `MakeBigSizeRecord` that can be used optionally where db space is a concern. |
||
---|---|---|
.. | ||
go.mod | ||
go.sum | ||
primitive_test.go | ||
primitive.go | ||
record_test.go | ||
record.go | ||
stream_test.go | ||
stream.go | ||
tlv_test.go | ||
truncated_test.go | ||
truncated.go | ||
varint_test.go | ||
varint.go |