fs2.interop.scodec

Members list

Type members

Classlikes

final case class CodecError(err: Err) extends Exception

Lifts an scodec.Err in to an exception.

Lifts an scodec.Err in to an exception.

Attributes

Source
CodecError.scala
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final class StreamDecoder[+A]

Supports binary decoding of a stream that emits elements as they are decoded.

Supports binary decoding of a stream that emits elements as they are decoded.

The main purpose of using a StreamDecoder over a scodec.Decoder is mixing decoding with processing. For example, scodec.codecs.vector(decoderA): Decoder[Vector[A]] could be used to decode a bit stream but the decoded Vector[A] would not be emitted until the end of the bit stream. With StreamDecoder.many(decoderA): StreamDecoder[A], each decoded A value is emitted as soon as it is decoded.

The StreamDecoder companion has various constructors -- most importantly, once and many, that allow a Decoder[A] to be lifted to a StreamDecoder[A].

Given a StreamDecoder[A], a bit stream can be decoded via the decode method or by calling a variant of toPipe.

Attributes

Companion
object
Source
StreamDecoder.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object StreamDecoder

Attributes

Companion
class
Source
StreamDecoder.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final class StreamEncoder[A]

A streaming encoding process, represented as a Stream[Pure, A] => Pull[Pure, BitVector, Option[(Stream[Pure, A], StreamEncoder[A])]].

A streaming encoding process, represented as a Stream[Pure, A] => Pull[Pure, BitVector, Option[(Stream[Pure, A], StreamEncoder[A])]].

Attributes

Companion
object
Source
StreamEncoder.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object StreamEncoder

Attributes

Companion
class
Source
StreamEncoder.scala
Supertypes
class Object
trait Matchable
class Any
Self type