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
.
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.
- Source
- ByteVector.scala
- Alphabetic
- By Inheritance
- ByteVector
- Serializable
- Ordered
- Comparable
- BitwiseOperations
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def &(other: ByteVector): ByteVector
Returns a bitwise AND of this bit vector with the specified bit vector.
Returns a bitwise AND of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- BitwiseOperations
- def ++(other: ByteVector): ByteVector
Returns a new byte vector representing this vector's contents followed by the specified vector's contents.
- final def +:(byte: Byte): ByteVector
Returns a new vector with the specified byte prepended.
- def :+(byte: Byte): ByteVector
Returns a new vector with the specified byte appended.
- def <(that: ByteVector): Boolean
- Definition Classes
- Ordered
- final def <<(n: Long): ByteVector
Returns a bit vector of the same size with each bit shifted to the left
n
bits.Returns a bit vector of the same size with each bit shifted to the left
n
bits.- Definition Classes
- BitwiseOperations
- def <=(that: ByteVector): Boolean
- Definition Classes
- Ordered
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ===(other: ByteVector): Boolean
Returns true if the specified
ByteVector
has the same contents as this vector. - def >(that: ByteVector): Boolean
- Definition Classes
- Ordered
- def >=(that: ByteVector): Boolean
- Definition Classes
- Ordered
- final def >>(n: Long): ByteVector
Returns a bit vector of the same size with each bit shifted to the right
n
bits where then
left-most bits are sign extended.Returns a bit vector of the same size with each bit shifted to the right
n
bits where then
left-most bits are sign extended.- Definition Classes
- BitwiseOperations
- final def >>>(n: Long): ByteVector
Returns a bit vector of the same size with each bit shifted to the right
n
bits where then
left-most bits are low.Returns a bit vector of the same size with each bit shifted to the right
n
bits where then
left-most bits are low.- Definition Classes
- BitwiseOperations
- final def ^(other: ByteVector): ByteVector
Returns a bitwise XOR of this bit vector with the specified bit vector.
Returns a bitwise XOR of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- BitwiseOperations
- def acquire(n: Long): Either[String, ByteVector]
Returns a vector whose contents are the results of taking the first
n
bytes of this vector.Returns a vector whose contents are the results of taking the first
n
bytes of this vector.If this vector does not contain at least
n
bytes, an error message is returned.- See also
take
- final def and(other: ByteVector): ByteVector
Returns a bitwise AND of this bit vector with the specified bit vector.
Returns a bitwise AND of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- ByteVector → BitwiseOperations
- final def apply(index: Long): Byte
Alias for get.
Alias for get.
- Exceptions thrown
IndexOutOfBoundsException
if the specified index is not in[0, size)
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def bits: BitVector
Alias for toBitVector.
- final def buffer: ByteVector
Allocate (unobservable) mutable scratch space at the end of this
ByteVector
, which will be used to support fast:+
and++
of small vectors.Allocate (unobservable) mutable scratch space at the end of this
ByteVector
, which will be used to support fast:+
and++
of small vectors. A default chunk size is used.Note that
:+
,++
, anddrop
on the result of a call tobuffer
are guaranteed to return another bufferedByteVector
. - final def bufferBy(chunkSize: Int): ByteVector
Allocate (unobservable) mutable scratch space at the end of this
ByteVector
, with chunks of the given size, which will be used to support fast:+
and++
of small vectors.Allocate (unobservable) mutable scratch space at the end of this
ByteVector
, with chunks of the given size, which will be used to support fast:+
and++
of small vectors.Note that
:+
,++
, anddrop
on the result of a call tobuffer
are guaranteed to return another bufferedByteVector
, with the same size scratch space. - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def compact: ByteVector
Returns a vector with the same contents but represented as a single tree node internally.
Returns a vector with the same contents but represented as a single tree node internally.
This may involve copying data, but has the advantage that lookups index directly into a single node rather than traversing a logarithmic number of nodes in this tree.
Calling this method on an already compacted vector is a no-op.
- def compare(that: ByteVector): Int
- Definition Classes
- ByteVector → Ordered
- def compareTo(that: ByteVector): Int
- Definition Classes
- Ordered → Comparable
- final def consume[A](n: Long)(decode: (ByteVector) => Either[String, A]): Either[String, (ByteVector, A)]
Consumes the first
n
bytes of this vector and decodes them with the specified function, resulting in a vector of the remaining bytes and the decoded value.Consumes the first
n
bytes of this vector and decodes them with the specified function, resulting in a vector of the remaining bytes and the decoded value. If this vector does not haven
bytes or an error occurs while decoding, an error is returned instead. - final def containsSlice(slice: ByteVector): Boolean
Determines if the specified slice is in this vector.
- final def copy: ByteVector
Returns a vector with the same contents as this vector but with a single compacted node made up by evaluating all internal nodes and concatenating their values.
- final def copyToArray(xs: Array[Byte], start: Int, offset: Long, size: Int): Unit
Copies
size
bytes of this vector, starting at indexoffset
, to arrayxs
, beginning at indexstart
. - final def copyToArray(xs: Array[Byte], start: Int): Unit
Copies the contents of this vector to array
xs
, beginning at indexstart
. - final def copyToBuffer(buffer: ByteBuffer): Int
Copies as many bytes as possible to the given ByteBuffer, starting from its current position.
Copies as many bytes as possible to the given ByteBuffer, starting from its current position. This method will not overflow the buffer.
- buffer
a ByteBuffer to copy bytes to
- returns
the number of bytes actually copied
- final def copyToStream(s: OutputStream): Unit
Copies the contents of this vector to OutputStream
s
. - final def decodeAscii: Either[CharacterCodingException, String]
Decodes this vector as a string using the US-ASCII charset.
- final def decodeString(implicit charset: Charset): Either[CharacterCodingException, String]
Decodes this vector as a string using the implicitly available charset.
- final def decodeUtf8: Either[CharacterCodingException, String]
Decodes this vector as a string using the UTF-8 charset.
- final def decrypt(ci: Cipher, key: Key, aparams: Option[AlgorithmParameters] = None)(implicit sr: SecureRandom): Either[GeneralSecurityException, ByteVector]
Decrypts this byte vector using the specified cipher and key.
Decrypts this byte vector using the specified cipher and key.
- ci
cipher to use for decryption
- key
key to decrypt with
- aparams
optional algorithm paramaters used for decryption (e.g., initialization vector)
- sr
secure random
- final def deflate(level: Int = Deflater.DEFAULT_COMPRESSION, strategy: Int = Deflater.DEFAULT_STRATEGY, nowrap: Boolean = false, chunkSize: Int = 4096): ByteVector
Compresses this vector using ZLIB.
Compresses this vector using ZLIB.
- level
compression level, 0-9, with 0 disabling compression and 9 being highest level of compression -- see
java.util.zip.Deflater
for details- strategy
compression strategy -- see
java.util.zip.Deflater
for details- nowrap
if true, ZLIB header and checksum will not be used
- chunkSize
buffer size, in bytes, to use when compressing
- final def digest(digest: MessageDigest): ByteVector
Computes a digest of this byte vector.
Computes a digest of this byte vector.
- digest
digest to use
- final def digest(algorithm: String): ByteVector
Computes a digest of this byte vector.
Computes a digest of this byte vector.
- algorithm
digest algorithm to use
- def drop(n: Long): ByteVector
Returns a vector of all bytes in this vector except the first
n
bytes.Returns a vector of all bytes in this vector except the first
n
bytes.The resulting vector's size is
0 max (size - n)
. - final def dropRight(n: Long): ByteVector
Returns a vector of all bytes in this vector except the last
n
bytes.Returns a vector of all bytes in this vector except the last
n
bytes.The resulting vector's size is
0 max (size - n)
. - final def dropWhile(f: (Byte) => Boolean): ByteVector
Drops the longest prefix of this vector such that every byte of the prefix satisfies the specific predicate.
- final def encrypt(ci: Cipher, key: Key, aparams: Option[AlgorithmParameters] = None)(implicit sr: SecureRandom): Either[GeneralSecurityException, ByteVector]
Encrypts this byte vector using the specified cipher and key.
Encrypts this byte vector using the specified cipher and key.
- ci
cipher to use for encryption
- key
key to encrypt with
- aparams
optional algorithm paramaters used for encryption (e.g., initialization vector)
- sr
secure random
- final def endsWith(b: ByteVector): Boolean
Returns true if this byte vector ends with the specified vector.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: Any): Boolean
Returns true if the specified value is a
ByteVector
with the same contents as this vector.Returns true if the specified value is a
ByteVector
with the same contents as this vector.- Definition Classes
- ByteVector → AnyRef → Any
- See also
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def foldLeft[A](z: A)(f: (A, Byte) => A): A
Applies a binary operator to a start value and all elements of this vector, going left to right.
Applies a binary operator to a start value and all elements of this vector, going left to right.
- z
starting value
- f
operator to apply
- final def foldLeftBB[A](z: A)(f: (A, ByteBuffer) => A): A
Applies a binary operator to a start value and all segments(views) of this ByteVector expressed as read-only ByteBuffer, going left to right.
Applies a binary operator to a start value and all segments(views) of this ByteVector expressed as read-only ByteBuffer, going left to right.
- z
Starting value
- f
operator to apply
- final def foldRight[A](z: A)(f: (Byte, A) => A): A
Applies a binary operator to a start value and all elements of this vector, going right to left.
Applies a binary operator to a start value and all elements of this vector, going right to left.
- z
starting value
- f
operator to apply
- final def foldRightBB[A](z: A)(f: (ByteBuffer, A) => A): A
Applies a binary operator to a start value and all segments(views) of this ByteVector expressed as read-only ByteBuffer, going right ot left.
Applies a binary operator to a start value and all segments(views) of this ByteVector expressed as read-only ByteBuffer, going right ot left.
- z
Starting value
- f
operator to apply
- final def foreach(f: (Byte) => Unit): Unit
Applies the specified function to each element of this vector.
- def get(index: Long): Byte
Gets the byte at the specified index.
Gets the byte at the specified index.
- Exceptions thrown
IndexOutOfBoundsException
if the specified index is not in[0, size)
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- lazy val hashCode: Int
Calculates the hash code of this vector.
Calculates the hash code of this vector. The result is cached.
- final def head: Byte
Returns the first byte of this vector or throws if vector is emtpy.
- final def headOption: Option[Byte]
Returns the first byte of this vector or
None
if vector is emtpy. - def iff(other: ByteVector): ByteVector
Returns a bitwise if-and-only-if of this bit vector with the specified bit vector.
Returns a bitwise if-and-only-if of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- BitwiseOperations
- def implies(other: ByteVector): ByteVector
Returns a bitwise implication of this bit vector with the specified bit vector.
Returns a bitwise implication of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- BitwiseOperations
- final def indexOfSlice(slice: ByteVector, from: Long): Long
Finds the first index after
from
of the specified byte pattern in this vector.Finds the first index after
from
of the specified byte pattern in this vector.- returns
index of slice or -1 if not found
- final def indexOfSlice(slice: ByteVector): Long
Finds the first index of the specified byte pattern in this vector.
Finds the first index of the specified byte pattern in this vector.
- returns
index of slice or -1 if not found
- final def inflate(chunkSize: Int = 4096, nowrap: Boolean = false): Either[DataFormatException, ByteVector]
Decompresses this vector using ZLIB.
Decompresses this vector using ZLIB.
- chunkSize
buffer size, in bytes, to use when compressing
- nowrap
if true, will assume no ZLIB header and checksum
- final def init: ByteVector
Returns a vector of all bytes in this vector except the last byte.
- final def insert(idx: Long, b: Byte): ByteVector
Returns a vector with the specified byte inserted at the specified index.
- final def intSize: Option[Int]
Returns the number of bytes in this vector, or
None
if the size does not fit into anInt
. - final def isEmpty: Boolean
Returns true if this vector has no bytes.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def last: Byte
Returns the last byte in this vector or throws if vector is empty.
- final def lastOption: Option[Byte]
Returns the last byte in this vector or returns
None
if vector is empty. - final def length: Long
Alias for size.
- final def lift(index: Long): Option[Byte]
Returns the byte at the specified index, or
None
if the index is out of range. - final def map(f: (Byte) => Byte): ByteVector
Returns a vector where each byte is the result of applying the specified function to the corresponding byte in this vector.
Returns a vector where each byte is the result of applying the specified function to the corresponding byte in this vector. This method returns a view and hence, is O(1). Call compact to generate a new strict vector.
- final def mapI(f: (Byte) => Int): ByteVector
Returns a vector where each byte is the result of applying the specified function to the corresponding byte in this vector.
Returns a vector where each byte is the result of applying the specified function to the corresponding byte in this vector. Only the least significant byte is used (the three most significant bytes are ignored). This method returns a view and hence, is O(1). Call compact to generate a new strict vector.
- def nand(other: ByteVector): ByteVector
Returns a bitwise NAND of this bit vector with the specified bit vector.
Returns a bitwise NAND of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- BitwiseOperations
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def nonEmpty: Boolean
Returns true if this vector has a non-zero number of bytes.
- def nor(other: ByteVector): ByteVector
Returns a bitwise NOR of this bit vector with the specified bit vector.
Returns a bitwise NOR of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- BitwiseOperations
- final def not: ByteVector
Returns a bitwise complement of this bit vector.
Returns a bitwise complement of this bit vector.
- Definition Classes
- ByteVector → BitwiseOperations
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def or(other: ByteVector): ByteVector
Returns a bitwise OR of this bit vector with the specified bit vector.
Returns a bitwise OR of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- ByteVector → BitwiseOperations
- final def padLeft(n: Long): ByteVector
Returns an
n
-bytes vector whose contents are 0 or more zero bytes followed by this vector's contents.Returns an
n
-bytes vector whose contents are 0 or more zero bytes followed by this vector's contents.- Exceptions thrown
IllegalArgumentException
ifn < size
- final def padRight(n: Long): ByteVector
Returns an
n
-byte vector whose contents are this vector's contents followed by 0 or more zero bytes.Returns an
n
-byte vector whose contents are this vector's contents followed by 0 or more zero bytes.- Exceptions thrown
IllegalArgumentException
ifn < size
- final def padTo(n: Long): ByteVector
Alias for
padRight
.Alias for
padRight
.- Exceptions thrown
IllegalArgumentException
ifn < size
- final def partialCompact(chunkSize: Long): ByteVector
Invokes
compact
on any subtrees whose size is<= chunkSize
. - final def patch(idx: Long, b: ByteVector): ByteVector
Returns a vector with the specified byte vector replacing bytes
[idx, idx + b.size]
. - final def reverse: ByteVector
Returns a vector with the bytes of this vector in reverse order.
Returns a vector with the bytes of this vector in reverse order. This method returns a view and hence, is O(1). Call compact to generate a new strict vector.
- final def rotateLeft(n: Long): ByteVector
Returns a bit vector of the same size with each bit circularly shifted to the left
n
bits.Returns a bit vector of the same size with each bit circularly shifted to the left
n
bits.- Definition Classes
- ByteVector → BitwiseOperations
- final def rotateRight(n: Long): ByteVector
Returns a bit vector of the same size with each bit circularly shifted to the right
n
bits.Returns a bit vector of the same size with each bit circularly shifted to the right
n
bits.- Definition Classes
- ByteVector → BitwiseOperations
- final def shiftLeft(n: Long): ByteVector
Returns a bit vector of the same size with each bit shifted to the left
n
bits.Returns a bit vector of the same size with each bit shifted to the left
n
bits.- Definition Classes
- ByteVector → BitwiseOperations
- final def shiftRight(n: Long, signExtension: Boolean): ByteVector
Returns a bit vector of the same size with each bit shifted to the right
n
bits.Returns a bit vector of the same size with each bit shifted to the right
n
bits.- signExtension
whether the
n
left-msot bits should take on the value of bit 0
- Definition Classes
- ByteVector → BitwiseOperations
- final def slice(from: Long, until: Long): ByteVector
Returns a vector made up of the bytes starting at index
from
up to indexuntil
. - final def splice(idx: Long, b: ByteVector): ByteVector
Returns a vector with the specified byte vector inserted at the specified index.
- final def splitAt(n: Long): (ByteVector, ByteVector)
Returns a pair of vectors that is equal to
(take(n), drop(n))
. - final def startsWith(b: ByteVector): Boolean
Returns true if this byte vector starts with the specified vector.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def tail: ByteVector
Returns a vector of all bytes in this vector except the first byte.
- def take(n: Long): ByteVector
Returns a vector of the first
n
bytes of this vector.Returns a vector of the first
n
bytes of this vector.The resulting vector's size is
n min size
.Note: if an
n
-byte vector is required, use theacquire
method instead.- See also
acquire
- final def takeRight(n: Long): ByteVector
Returns a vector of the last
n
bytes of this vector.Returns a vector of the last
n
bytes of this vector.The resulting vector's size is
n min size
. - final def takeWhile(f: (Byte) => Boolean): ByteVector
Returns the longest prefix of this vector such that every byte satisfies the specific predicate.
- final def toArray: Array[Byte]
Converts the contents of this vector to a byte array.
- final def toBase16(alphabet: HexAlphabet): String
Helper alias for toHex(alphabet:scodec\.bits\.Bases\.HexAlphabet):String*
- final def toBase16: String
Helper alias for toHex:String*
- final def toBase32(alphabet: Base32Alphabet): String
Converts the contents of this vector to a base 32 string using the specified alphabet.
- final def toBase32: String
Converts the contents of this vector to a base 32 string.
- final def toBase58(alphabet: Alphabet): String
Converts the contents of this vector to a base 58 string using the specified alphabet.
- final def toBase58: String
Converts the contents of this vector to a base 58 string.
- final def toBase64(alphabet: Base64Alphabet): String
Converts the contents of this vector to a base 64 string using the specified alphabet.
- final def toBase64: String
Converts the contents of this vector to a base 64 string.
- final def toBase64NoPad: String
Converts the contents of this vector to a base 64 string without padding.
- final def toBase64Url: String
Converts the contents of this vector to a base 64 url string with padding.
- final def toBase64UrlNoPad: String
Converts the contents of this vector to a base 64 url string without padding.
- final def toBin(alphabet: BinaryAlphabet): String
Converts the contents of this byte vector to a binary string of
size * 8
digits. - final def toBin: String
Converts the contents of this byte vector to a binary string of
size * 8
digits. - final def toBitVector: BitVector
Converts the contents of this vector to a bit vector of
size * 8
bits. - final def toByte(signed: Boolean = true): Byte
Converts the contents of this vector to a byte.
Converts the contents of this vector to a byte.
- signed
whether sign extension should be performed
- Exceptions thrown
IllegalArgumentException
if size is greater than 8
- final def toByteBuffer: ByteBuffer
Represents the contents of this vector as a read-only
java.nio.ByteBuffer
.Represents the contents of this vector as a read-only
java.nio.ByteBuffer
.The returned buffer is read-only with limit set to the minimum number of bytes needed to represent the contents of this vector, position set to zero, and remaining set to the limit.
- final def toHex(alphabet: HexAlphabet): String
Converts the contents of this byte vector to a hexadecimal string of
size * 2
nibbles. - final def toHex: String
Converts the contents of this byte vector to a hexadecimal string of
size * 2
nibbles. - final def toIndexedSeq: IndexedSeq[Byte]
Converts the contents of this vector to an
IndexedSeq
. - final def toInt(signed: Boolean = true, ordering: ByteOrdering = ByteOrdering.BigEndian): Int
Converts the contents of this vector to an int.
Converts the contents of this vector to an int.
- signed
whether sign extension should be performed
- ordering
order bytes should be processed in
- Exceptions thrown
IllegalArgumentException
if size is greater than 32
- final def toIterable: Iterable[Byte]
Converts the contents of this vector to an
Iterable
. - final def toLong(signed: Boolean = true, ordering: ByteOrdering = ByteOrdering.BigEndian): Long
Converts the contents of this vector to an int.
Converts the contents of this vector to an int.
- signed
whether sign extension should be performed
- ordering
order bytes should be processed in
- Exceptions thrown
IllegalArgumentException
if size is greater than 64
- final def toSeq: Seq[Byte]
Converts the contents of this vector to a
Seq
. - final def toShort(signed: Boolean = true, ordering: ByteOrdering = ByteOrdering.BigEndian): Short
Converts the contents of this vector to a short.
Converts the contents of this vector to a short.
- signed
whether sign extension should be performed
- ordering
order bytes should be processed in
- Exceptions thrown
IllegalArgumentException
if size is greater than 16
- def toString(): String
Display the size and bytes of this
ByteVector
.Display the size and bytes of this
ByteVector
. For bit vectors beyond a certain size, only a hash of the contents are shown.- Definition Classes
- ByteVector → AnyRef → Any
- final def toUUID: UUID
Converts the contents of this byte vector to a UUID.
Converts the contents of this byte vector to a UUID.
- Exceptions thrown
IllegalArgumentException
if size is not exactly 16.
- final def unary_~: ByteVector
Returns a bitwise complement of this bit vector.
Returns a bitwise complement of this bit vector.
- Definition Classes
- BitwiseOperations
- def unbuffer: ByteVector
Collapse any buffered chunks at the end of this
ByteVector
, resulting in an unbufferedByteVector
. - final def update(idx: Long, b: Byte): ByteVector
Returns a vector with the byte at the specified index replaced with the specified byte.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def writeReplace(): AnyRef
- Attributes
- protected
- final def xor(other: ByteVector): ByteVector
Returns a bitwise XOR of this bit vector with the specified bit vector.
Returns a bitwise XOR of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- ByteVector → BitwiseOperations
- final def zipWith(other: ByteVector)(f: (Byte, Byte) => Byte): ByteVector
Returns a new vector where each byte is the result of evaluating the specified function against the bytes of this vector and the specified vector at the corresponding index.
Returns a new vector where each byte is the result of evaluating the specified function against the bytes of this vector and the specified vector at the corresponding index. The resulting vector has size
this.size min other.size
. This method returns a view and hence, is O(1). Call compact to generate a new strict vector. - final def zipWith2(other: ByteVector, other2: ByteVector)(f: (Byte, Byte, Byte) => Byte): ByteVector
See zipWith This method returns a view and hence, is O(1).
- final def zipWith3(other: ByteVector, other2: ByteVector, other3: ByteVector)(f: (Byte, Byte, Byte, Byte) => Byte): ByteVector
See zipWith This method returns a view and hence, is O(1).
- final def zipWithI(other: ByteVector)(op: (Byte, Byte) => Int): ByteVector
Returns a new vector where each byte is the result of evaluating the specified function against the bytes of this vector and the specified vector at the corresponding index.
Returns a new vector where each byte is the result of evaluating the specified function against the bytes of this vector and the specified vector at the corresponding index. The resulting vector has size
this.size min other.size
. Only the least significant byte is used (the three most significant bytes are ignored). This method returns a view and hence, is O(1). Call compact to generate a new strict vector. - final def zipWithI2(other: ByteVector, other2: ByteVector)(op: (Byte, Byte, Byte) => Int): ByteVector
See zipWithI This method returns a view and hence, is O(1).
- final def zipWithI3(other: ByteVector, other2: ByteVector, other3: ByteVector)(op: (Byte, Byte, Byte, Byte) => Int): ByteVector
See zipWithI This method returns a view and hence, is O(1).
- final def |(other: ByteVector): ByteVector
Returns a bitwise OR of this bit vector with the specified bit vector.
Returns a bitwise OR of this bit vector with the specified bit vector.
The resulting bit vector's size is the minimum of this bit vector's size and the specified bit vector's size.
- Definition Classes
- BitwiseOperations