Interface IDataBlock
Some data that is stored in IPFS.
Namespace: Ipfs
Assembly: Ipfs.Core.dll
Syntax
public interface IDataBlock
Remarks
A DataBlock has an Id and some data (DataBytes or DataStream).
It is useful to talk about them as "blocks" in Bitswap and other things that do not care about what is being stored.
Properties
| Improve this Doc View SourceDataBytes
Contents as a byte array.
Declaration
byte[] DataBytes { get; }
Property Value
Type | Description |
---|---|
Byte[] | The contents as a sequence of bytes. |
Remarks
It is never null.
DataStream
Contents as a stream of bytes.
Declaration
Stream DataStream { get; }
Property Value
Type | Description |
---|---|
Stream | The contents as a stream of bytes. |
Id
The unique ID of the data.
Declaration
Cid Id { get; }
Property Value
Type | Description |
---|---|
Cid | A Cid of the content. |
Size
The size (in bytes) of the data.
Declaration
long Size { get; }
Property Value
Type | Description |
---|---|
Int64 | Number of bytes. |
See Also
IMerkleNode<Link>