package bits
Provides immutable data types for working with bits and bytes.
- Source
- package.scala
- See also
BitVector and ByteVector
- Alphabetic
- By Inheritance
- bits
- ScalaVersionSpecific
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
implicit final
class
AsciiStringSyntax extends AnyVal
Provides the
ascii
string interpolator, which returnsByteVector
instances from ascii strings. -
implicit final
class
BinStringSyntax extends AnyVal
Provides the
bin
string interpolator, which returnsBitVector
instances from binary strings. -
sealed abstract
class
BitVector extends BitwiseOperations[BitVector, Long] with BitVectorCrossPlatform 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.
-
trait
BitwiseOperations[Repr <: BitwiseOperations[Repr, Idx], Idx] extends AnyRef
Bitwise operations on a value of type
Repr
.Bitwise operations on a value of type
Repr
.- Repr
type that supports that supports bitwise operations
- Idx
numeric index type
-
sealed
trait
ByteOrdering extends AnyRef
Enumeration of byte ordering.
-
sealed abstract
class
ByteVector extends ByteVectorCrossPlatform with BitwiseOperations[ByteVector, Long] with Ordered[ByteVector] with Serializable
An immutable vector of bytes, backed by a balanced binary tree of chunks.
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
, andinsert
. Where possible, operations return lazy views rather than copying any underlying bytes. Usecopy
to copy all underlying bytes to a fresh, array-backedByteVector
.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
, ortoIterable
to obtain a regularscala.collection
type. -
final
class
HexDumpFormat extends AnyRef
Creates hex dumps for bit and byte vectors.
Creates hex dumps for bit and byte vectors.
Formatting options can be specified by starting with
HexDumpFormat.Default
and then calling variouswithXyz
methods. -
implicit final
class
HexStringSyntax extends AnyVal
Provides the
hex
string interpolator, which returnsByteVector
instances from hexadecimal strings. -
type
IterableOnce[+A] = GenTraversableOnce[A]
- Definition Classes
- ScalaVersionSpecific
-
implicit
class
IterableOnceOps[A] extends AnyRef
- Definition Classes
- ScalaVersionSpecific
-
implicit final
class
Utf8StringSyntax extends AnyVal
Provides the
utf8
string interpolator, which returnsByteVector
instances from UTF8 strings.
Value Members
-
object
Bases
Provides types related to base conversion -- e.g., binary, hexadecimal, and base 64.
-
object
BitVector extends BitVectorCompanionCrossPlatform with Serializable
Companion for BitVector.
-
object
ByteOrdering
Companion for ByteOrdering.
-
object
ByteVector extends ByteVectorCompanionCrossPlatform with Serializable
Companion for ByteVector.
- object HexDumpFormat
-
object
LiteralSyntaxMacros
Macros that support binary and hexadecimal literals.
-
object
crc
Provides support for calculating cyclic redundancy checks.
Provides support for calculating cyclic redundancy checks.
- See also
http://www.repairfaq.org/filipg/LINK/F_crc_v3.html