scodec.bits

package scodec.bits

Type members

Classlikes

object Bases

Provides types related to base conversion -- e.g., binary, hexadecimal, and base 64.

Provides types related to base conversion -- e.g., binary, hexadecimal, and base 64.

sealed abstract class BitVector extends BitwiseOperations[BitVector, Long] with Ordered[BitVector] with Serializable

Persistent vector of bits, stored as bytes.

Persistent vector of bits, stored as bytes.

Bits are numbered left to right, starting at 0.

Companion
object
object BitVector extends BitVectorPlatform

Companion for BitVector.

Companion for BitVector.

Companion
class
trait BitwiseOperations[Repr <: BitwiseOperations[Repr, Idx], Idx]

Bitwise operations on a value of type Repr.

Bitwise operations on a value of type Repr.

Type Params
Idx

numeric index type

Repr

type that supports that supports bitwise operations

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

sealed trait ByteOrdering

Enumeration of byte ordering.

Enumeration of byte ordering.

Companion
object
object ByteOrdering

Companion for ByteOrdering.

Companion for ByteOrdering.

Companion
class
sealed abstract class ByteVector extends BitwiseOperations[ByteVector, Long] with Ordered[ByteVector] with Serializable

An immutable vector of bytes, backed by a balanced binary tree of chunks. Most operations are logarithmic in the depth of this tree, including ++, :+, +:, update, and insert. Where possible, operations return lazy views rather than copying any underlying bytes. Use copy to copy all underlying bytes to a fresh, array-backed ByteVector.

An immutable vector of bytes, backed by a balanced binary tree of chunks. Most operations are logarithmic in the depth of this tree, including ++, :+, +:, update, and insert. Where possible, operations return lazy views rather than copying any underlying bytes. Use copy to copy all underlying bytes to a fresh, array-backed ByteVector.

Unless otherwise noted, operations follow the same naming as the scala standard library collections, though this class does not extend any of the standard scala collections. Use toIndexedSeq, toSeq, or toIterable to obtain a regular scala.collection type.

Companion
object
object ByteVector extends ByteVectorPlatform

Companion for ByteVector.

Companion for ByteVector.

Companion
class
object Literals
object crc

Provides support for calculating cyclic redundancy checks.

Provides support for calculating cyclic redundancy checks.

See also

Extensions

Extensions

extension (ctx: StringContext)
inline def hex(inline args: Any*): ByteVector

Provides the hex string interpolator, which returns ByteVector instances from hexadecimal strings.

Provides the hex string interpolator, which returns ByteVector instances from hexadecimal strings.

Example
scala> val b = hex"deadbeef"
val b: scodec.bits.ByteVector = ByteVector(4 bytes, 0xdeadbeef)
extension (ctx: StringContext)
inline def bin(inline args: Any*): BitVector

Provides the bin string interpolator, which returns BitVector instances from binary strings.

Provides the bin string interpolator, which returns BitVector instances from binary strings.

Example
scala> val b = bin"1010101010"
val b: scodec.bits.BitVector = BitVector(10 bits, 0xaa8)