The Process
backing this StreamDecoder
.
The Process
backing this StreamDecoder
. All functions on StreamDecoder
are defined in terms of this Process.
The Process1
backing this StreamEncoder[A]
.
The Process1
backing this StreamEncoder[A]
. All functions on StreamEncoder
are defined in terms of this Process1
.
Run this StreamDecoder
, then d
, then concatenate the two streams.
Run this StreamDecoder
, then d
, then concatenate the two streams.
Run this StreamEncoder
, followed by e
.
Run this StreamEncoder
, followed by e
.
Convert this StreamEncoder
to output bits in the given chunk size.
Convert this StreamEncoder
to output bits in the given chunk size.
Only the last chunk may have fewer than bitsPerChunk
bits.
Transform the output of this StreamDecoder
using the partial function pf
.
Transform the output of this StreamDecoder
using the partial function pf
.
Transform the input type of this StreamEncoder
.
Transform the input type of this StreamEncoder
.
Transform the input type of this StreamEncoder
using the given transducer.
Transform the input type of this StreamEncoder
using the given transducer.
Decoding a stream of A
values from the given BitVector
.
Decoding a stream of A
values from the given BitVector
.
This function does not retain a reference to bits
, allowing
it to be be garbage collected as the returned stream is traversed.
Decode the given BitVector
, returning a strict Vector
of
the results, and throwing an exception in the event of a
decoding error.
Decode the given BitVector
, returning a strict Vector
of
the results, and throwing an exception in the event of a
decoding error.
Resource-safe version of decode
.
Resource-safe version of decode
. Acquires a resource,
decodes a stream of values, and releases the resource when
the returned Process[Task,A]
is finished being consumed.
The acquire
and release
actions may be asynchronous.
Resource-safe version of decode
for a ReadableByteChannel
resource.
Resource-safe version of decode
for a ReadableByteChannel
resource.
This is just a convenience function which calls decodeResource, using
scodec.bits.BitVector.fromChannel as the read
function, and which
closes in
after the returned Process[Task,A]
is consumed.
Resource-safe version of decode
for an InputStream
resource.
Resource-safe version of decode
for an InputStream
resource.
This is just a convenience function which calls decodeResource, using
scodec.bits.BitVector.fromInputStream as the read
function, and which
closes in
after the returned Process[Task,A]
is consumed.
Resource-safe version of decode
for a ReadableByteChannel
resource.
Resource-safe version of decode
for a ReadableByteChannel
resource.
This is just a convenience function which calls decodeResource, using
scodec.bits.BitVector.fromChannel as the read
function, and which
closes in
after the returned Process[Task,A]
is consumed.
Resource-safe version of decode
.
Resource-safe version of decode
. Acquires a resource,
decodes a stream of values, and releases the resource when
the returned Process[Task,A]
is finished being consumed.
If the acquire
and release
actions are asynchronous, use
decodeAsyncResource.
Ignore the first n
decoded values.
Ignore the first n
decoded values.
Ignore decoded values as long as the predicate tests true.
Ignore decoded values as long as the predicate tests true.
Modify the Process[Cursor,A]
backing this StreamDecoder
.
Modify the Process[Cursor,A]
backing this StreamDecoder
.
Modify the Process1
backing this StreamEncoder
.
Modify the Process1
backing this StreamEncoder
.
Encode the input stream of A
values using this StreamEncoder
.
Encode the input stream of A
values using this StreamEncoder
.
Encode the given sequence of A
values to a BitVector
, raising an exception
in the event of an encoding error.
Encode the given sequence of A
values to a BitVector
, raising an exception
in the event of an encoding error.
Skip any decoded values for which the predicate tests false.
Skip any decoded values for which the predicate tests false.
Equivalent to dropWhile(f).take(1)
- returns a stream of (at most)
one element, consisting of the first output for which f
tests false.
Equivalent to dropWhile(f).take(1)
- returns a stream of (at most)
one element, consisting of the first output for which f
tests false.
Monadic bind for this StreamDecoder
.
Monadic bind for this StreamDecoder
. Runs a stream decoder for each A
produced by this StreamDecoder
, then concatenates all the resulting
streams of results. This is the same 'idea' as List.flatMap
.
Like flatMap
, but takes a function that produces a Process[Cursor,B]
.
Like flatMap
, but takes a function that produces a Process[Cursor,B]
.
Promote to a StreamCodec[O]
given evidence that I
and O
are equal.
Promote to a StreamCodec[O]
given evidence that I
and O
are equal.
Alias for decode.isolate(numberOfBits)(this)
.
Alias for decode.isolate(numberOfBits)(this)
.
Alias for decode.isolateBytes(numberOfBytes)(this)
.
Alias for decode.isolateBytes(numberOfBytes)(this)
.
Run this StreamDecoder
zero or more times until the input is exhausted.
Run this StreamDecoder
zero or more times until the input is exhausted.
Run this StreamDecoder
one or more times until the input is exhausted.
Run this StreamDecoder
one or more times until the input is exhausted.
Transform the output of this StreamDecoder
using the function f
.
Transform the output of this StreamDecoder
using the function f
.
Transform the output BitVector
values produced by this encoder.
Transform the output BitVector
values produced by this encoder.
Transform the output of this StreamDecoder
, converting left values
to decoding failures.
Transform the output of this StreamDecoder
, converting left values
to decoding failures.
Raises a decoding error if the given decoder emits no results,
otherwise runs p
as normal.
Raises a decoding error if the given decoder emits no results,
otherwise runs p
as normal.
Run this StreamDecoder
, then d
, then concatenate the two streams,
even if this
halts with an error.
Run this StreamDecoder
, then d
, then concatenate the two streams,
even if this
halts with an error. The error will be reraised when
d
completes. See scalaz.stream.Process.onComplete.
Alias for scodec.stream.decode.or(this,d)
.
Alias for scodec.stream.decode.or(this,d)
.
Runs this
, then runs d
if this
emits no elements.
Example: tryOnce(codecs.int32).or(once(codecs.uint32))
.
This function does no backtracking of its own; any desired
backtracking should be handled by this
.
Alias for scodec.stream.decode.peek(this)
.
Alias for scodec.stream.decode.peek(this)
.
Transform the output of this StreamDecoder
using the given
single-input stream transducer.
Transform the output of this StreamDecoder
using the given
single-input stream transducer.
Statefully transform the output BitVector
values produced by this encoder.
Statefully transform the output BitVector
values produced by this encoder.
Alternate between decoding A
values using this StreamDecoder
,
and decoding B
values which are ignored.
Alternate between decoding A
values using this StreamDecoder
,
and decoding B
values which are ignored.
Decode at most n
values using this StreamDecoder
.
Decode at most n
values using this StreamDecoder
.
Decode values as long as the predicate tests true.
Decode values as long as the predicate tests true.
Combine the output of this StreamDecoder
with another streaming
decoder, using the given binary stream transducer.
Combine the output of this StreamDecoder
with another streaming
decoder, using the given binary stream transducer. Note that both
d
and this
will operate on the same input BitVector
, so this
combinator is more useful for expressing alternation between two
decoders.
Skip any decoded values for which the predicate tests false.
Skip any decoded values for which the predicate tests false.
Operator alias for this.or(d)
.
Operator alias for this.or(d)
.
Alias for this pipe p
.
Alias for this pipe p
.
(Since version 1.7.0) Use widenOpt instead