Packages

  • package root
    Definition Classes
    root
  • package fs2
    Definition Classes
    root
  • package data
    Definition Classes
    fs2
  • package cbor
    Definition Classes
    data
  • package high

    High-level representation and tools for CBOR data streams.

    High-level representation and tools for CBOR data streams.

    The high-level representation is less powerful as the low-level one, as it builds structured data. For instance it is not able to represent arrays of strings whose size is bigger than Int.MaxValue.

    The reprensentation is intended to be easier to work with if you need more structured data and don't exceed the underlying limits.

    Definition Classes
    cbor
  • package low

    Low-level representation and tools for CBOR data streams.

    Low-level representation and tools for CBOR data streams.

    The low-level representation has two main goals:

    • it is a flat representation of the input stream, which allows for expressing collections that exceed the max size of Int.MaxValue
      • it doesn't interpret numbers, keeping their raw representation in memory.

    This representation is useful when dealing with streams that may contain big collections or when it is not necessary to build an AST, as it is more efficient than the high-level one.

    The data model follows closely the structure described in the RFC.

    Definition Classes
    cbor
  • CborItem

package low

Low-level representation and tools for CBOR data streams.

The low-level representation has two main goals:

  • it is a flat representation of the input stream, which allows for expressing collections that exceed the max size of Int.MaxValue
    • it doesn't interpret numbers, keeping their raw representation in memory.

This representation is useful when dealing with streams that may contain big collections or when it is not necessary to build an AST, as it is more efficient than the high-level one.

The data model follows closely the structure described in the RFC.

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. low
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed trait CborItem extends AnyRef

    A low-level CBOR item.

    A low-level CBOR item. Items are emitted as soon as they are complete They can be used for reading/writing streamed CBOR data, including indefinite length arrays, maps, or strings.

Value Members

  1. def items[F[_]](implicit F: RaiseThrowable[F]): Pipe[F, Byte, CborItem]

    Parses the input byte stream into a sequence of low-level CBOR items.

    Parses the input byte stream into a sequence of low-level CBOR items. This allows for parsing arbitrary long and deep CBOR data. No AST is built.

  2. def toBinary[F[_]](implicit F: RaiseThrowable[F]): Pipe[F, CborItem, Byte]

    Transforms a stream of CBOR items into the binary representation.

    Transforms a stream of CBOR items into the binary representation.

    The resulting stream fails as soon as a problem is encounter.

  3. def toNonValidatedBinary[F[_]]: Pipe[F, CborItem, Byte]

    Transforms a stream of CBOR items into the binary representation.

    Transforms a stream of CBOR items into the binary representation.

    This produces a valid byte stream if the input item stream is well-formed, otherwise result is uncertain and will eventually produce an invalid byte sequence.

    Use this pipe if you are sure the stream is well-formed or if it does not matter to produce ill-formed streams.

    Since no validation is performed, this pipe is more efficient and allows for better throughput.

  4. def validate[F[_]](implicit F: RaiseThrowable[F]): Pipe[F, CborItem, CborItem]

    Validates the stream of CBOR items, emitting them unchanged.

    Validates the stream of CBOR items, emitting them unchanged.

    The resulting stream is failed as soon as a problem is encountered.

  5. object CborItem

Inherited from AnyRef

Inherited from Any

Ungrouped