Show / Hide Table of Contents

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 Source

DataBytes

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.

| Improve this Doc View Source

DataStream

Contents as a stream of bytes.

Declaration
Stream DataStream { get; }
Property Value
Type Description
Stream

The contents as a stream of bytes.

| Improve this Doc View Source

Id

The unique ID of the data.

Declaration
Cid Id { get; }
Property Value
Type Description
Cid

A Cid of the content.

| Improve this Doc View Source

Size

The size (in bytes) of the data.

Declaration
long Size { get; }
Property Value
Type Description
Int64

Number of bytes.

See Also

IMerkleNode<Link>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX