Move Size() elsewhere
Open
- Dominant language
- Go
- Stars
- 65
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
By case:
1. In CBOR encoded IPLD nodes, it means "size of this encoded node" (property of Block).
2. In protobuf IPFS nodes, it means "size of this encoded node + size of all encoded children" (property of IPFSNode because only IPFSNode links store enough metadata to efficiently compute this).
Therefore, it doesn't belong on `Node`.
1. Define `Size` on `Block` that returns the size of the encoded block case 1. Note: This `size` method *should not* be able to return an error.
2. Define some form of `FileSize`/`IPFSDagSize` on an `IPFSNode` type (elsewhere) for case 2.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.