ChecksumCodec

scodec.codecs.ChecksumCodec$

Provides methods to create a "checksum codec" (encodes a bit-range to a bit-checksum and decodes bits to a bit-range).

Attributes

Source:
ChecksumCodec.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

case class Mismatch(bits: BitVector, expected: BitVector, actual: BitVector, context: List[String]) extends Err

Attributes

Source:
ChecksumCodec.scala
Graph
Supertypes
trait Product
trait Equals
trait Err
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(encoder: Encoder[BitVector], range: Decoder[Long]): Codec[BitVector]

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Attributes

encoder

encodes a bit-range to a bit-checksum

range

decodes the size of a bit-range

Source:
ChecksumCodec.scala
def apply(encoder: Encoder[BitVector], range: Decoder[Long], padding: Long): Codec[BitVector]

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Attributes

encoder

encodes a bit-range to a bit-checksum

padding

size padding for the bit-range

range

decodes the (un-padded) size of a bit-range

Source:
ChecksumCodec.scala
def apply(encoder: Encoder[ByteVector], range: Decoder[Int], padding: Int): Codec[BitVector]

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Attributes

encoder

encodes a byte-range to a byte-checksum

padding

size padding for the byte-range

range

decodes the (un-padded) size of a byte-range

Source:
ChecksumCodec.scala
def apply(length: Long, f: BitVector => BitVector, range: Decoder[Long], padding: Long): Codec[BitVector]

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Attributes

f

computes bit-checksum

length

the bit-length of the checksum

padding

size padding for the bit-range

range

decodes the (un-padded) size of a bit-range

Source:
ChecksumCodec.scala
def apply(length: Int, f: ByteVector => ByteVector, range: Decoder[Int], padding: Int): Codec[BitVector]

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Returns a codec that encodes a bit-range to a bit-checksum and decodes bits to a bit-range.

Attributes

f

computes byte-checksum

length

the byte-length of the checksum

padding

size padding for the byte-range

range

decodes the (un-padded) size of a byte-range

Source:
ChecksumCodec.scala
def xor(length: Long, range: Decoder[Long], padding: Long): Codec[BitVector]

Returns a codec that encodes a bit-range to an XORed bit-checksum and decodes bits to a bit-range.

Returns a codec that encodes a bit-range to an XORed bit-checksum and decodes bits to a bit-range.

Attributes

length

the bit-length of the checksum

padding

size padding for the bit-range

range

decodes the (un-padded) size of a bit-range

Source:
ChecksumCodec.scala
def xor(length: Int, range: Decoder[Int], padding: Int): Codec[BitVector]

Returns a codec that encodes a bit-range to an XORed bit-checksum and decodes bits to a bit-range.

Returns a codec that encodes a bit-range to an XORed bit-checksum and decodes bits to a bit-range.

Attributes

length

the byte-length of the checksum

padding

size padding for the byte-range

range

decodes the (un-padded) size of a byte-range

Source:
ChecksumCodec.scala