Versions in this module Expand all Collapse all v0 v0.4.11 Apr 17, 2023 v0.4.1 Apr 3, 2023 Changes in this version + var MaxEntrySize = maxEntrySize() + func BlockPresenceSize(c cid.Cid) int + func Decompress(compressedData []byte, compressorType CompressorType) []byte + func Lz4_compress(val []byte) (value []byte) + func Lz4_decompress(data []byte) (value []byte) + func Snappy_compress(val []byte) []byte + func Snappy_decompress(data []byte) (value []byte) + func Zip_compress(val []byte) []byte + func Zip_decompress(data []byte) (value []byte) + func Zlib_compress(val []byte) []byte + func Zlib_decompress(data []byte) (value []byte) + func Zstd_compress(val []byte) (value []byte) + func Zstd_decompress(data []byte) (value []byte) + type BitSwapMessage interface + AddBlock func(blocks.Block) + AddBlockPresence func(cid.Cid, pb.Message_BlockPresenceType) + AddDontHave func(cid.Cid) + AddEntry func(key cid.Cid, priority int32, wantType pb.Message_Wantlist_WantType, ...) int + AddHave func(cid.Cid) + BlockPresences func() []BlockPresence + Blocks func() []blocks.Block + Cancel func(key cid.Cid) int + Clone func() BitSwapMessage + DontHaves func() []cid.Cid + Empty func() bool + Full func() bool + Haves func() []cid.Cid + Loggable func() map[string]interface{} + PendingBytes func() int32 + Remove func(key cid.Cid) + Reset func(bool) + SetPendingBytes func(int32) + Size func() int + Wantlist func() []Entry + func FromMsgReader(r msgio.Reader) (BitSwapMessage, error) + func FromNet(r io.Reader) (BitSwapMessage, error) + func New(full bool) BitSwapMessage + type BlockPresence struct + Cid cid.Cid + Type pb.Message_BlockPresenceType + type CompressorType int + const Lz4Compressor + const SnappyCompressor + const UnknownCompressor + const ZipCompressor + const ZlibCompressor + const ZstdCompressor + func GetCompressorType(compressedData []byte) CompressorType + type Entry struct + Cancel bool + SendDontHave bool + func (e *Entry) Size() int + func (e *Entry) ToPB() pb.Message_Wantlist_Entry + type Exportable interface + ToNetV0 func(w io.Writer) error + ToNetV1 func(w io.Writer) error + ToProtoV0 func() *pb.Message + ToProtoV1 func() *pb.Message