trait StreamCodec[A] extends StreamGenCodec[A, A]
- Alphabetic
- By Inheritance
- StreamCodec
- StreamGenCodec
- StreamDecoder
- StreamEncoder
- AnyRef
- Any
- by TransformSyntax
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
decoder: Stream[Cursor, A]
The
Streambacking thisStreamDecoder.The
Streambacking thisStreamDecoder. All functions onStreamDecoderare defined in terms of thisStream.- Definition Classes
- StreamDecoder
-
abstract
def
encoder: Step[A]
- Definition Classes
- StreamEncoder
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to any2stringadd[StreamCodec[A]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
final
def
++[A2 >: A](d: ⇒ decode.StreamDecoder[A2]): decode.StreamDecoder[A2]
Run this
StreamDecoder, thend, then concatenate the two streams.Run this
StreamDecoder, thend, then concatenate the two streams.- Definition Classes
- StreamDecoder
-
def
++(e: ⇒ encode.StreamEncoder[A]): encode.StreamEncoder[A]
Run this
StreamEncoder, followed bye.Run this
StreamEncoder, followed bye.- Definition Classes
- StreamEncoder
-
def
->[B](y: B): (StreamCodec[A], B)
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to ArrowAssoc[StreamCodec[A]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
as[B](implicit as: Transformer[A, B]): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
collect[B](pf: PartialFunction[A, B]): decode.StreamDecoder[B]
Transform the output of this
StreamDecoderusing the partial functionpf.Transform the output of this
StreamDecoderusing the partial functionpf.- Definition Classes
- StreamDecoder
-
final
def
decode[F[_]](bits: ⇒ BitVector)(implicit F: Effect[F]): Stream[F, A]
Decoding a stream of
Avalues from the givenBitVector.Decoding a stream of
Avalues from the givenBitVector. This function does not retain a reference tobits, allowing it to be be garbage collected as the returned stream is traversed.- Definition Classes
- StreamDecoder
-
def
decodeAllValid(bits: ⇒ BitVector): Vector[A]
Decode the given
BitVector, returning a strictVectorof the results, and throwing an exception in the event of a decoding error.Decode the given
BitVector, returning a strictVectorof the results, and throwing an exception in the event of a decoding error.- Definition Classes
- StreamDecoder
-
final
def
decodeAsyncResource[F[_], R](acquire: F[R])(read: (R) ⇒ BitVector, release: (R) ⇒ F[Unit])(implicit arg0: Effect[F]): Stream[F, A]
Resource-safe version of
decode.Resource-safe version of
decode. Acquires a resource, decodes a stream of values, and releases the resource when the returnedStream[F,A]is finished being consumed. Theacquireandreleaseactions may be asynchronous.- Definition Classes
- StreamDecoder
-
final
def
decodeChannel[F[_]](in: ⇒ ReadableByteChannel, chunkSizeInBytes: Int = 1024 * 1000 * 16, direct: Boolean = false)(implicit arg0: Effect[F]): Stream[F, A]
Resource-safe version of
decodefor aReadableByteChannelresource.Resource-safe version of
decodefor aReadableByteChannelresource. This is just a convenience function which calls decodeResource, usingscodec.bits.BitVector.fromChannelas thereadfunction, and which closesinafter the returnedStream[F,A]is consumed.- Definition Classes
- StreamDecoder
-
final
def
decodeInputStream[F[_]](in: ⇒ InputStream, chunkSizeInBytes: Int = 1024 * 1000 * 16)(implicit arg0: Effect[F]): Stream[F, A]
Resource-safe version of
decodefor anInputStreamresource.Resource-safe version of
decodefor anInputStreamresource. This is just a convenience function which calls decodeResource, usingscodec.bits.BitVector.fromInputStreamas thereadfunction, and which closesinafter the returnedStream[F,A]is consumed.- Definition Classes
- StreamDecoder
-
final
def
decodeMmap[F[_]](in: ⇒ FileChannel, chunkSizeInBytes: Int = 1024 * 1000 * 16)(implicit arg0: Effect[F]): Stream[F, A]
Resource-safe version of
decodefor aReadableByteChannelresource.Resource-safe version of
decodefor aReadableByteChannelresource. This is just a convenience function which calls decodeResource, usingscodec.bits.BitVector.fromChannelas thereadfunction, and which closesinafter the returnedStream[F,A]is consumed.- Definition Classes
- StreamDecoder
-
final
def
decodeResource[F[_], R](acquire: ⇒ R)(read: (R) ⇒ BitVector, release: (R) ⇒ Unit)(implicit F: Effect[F]): Stream[F, A]
Resource-safe version of
decode.Resource-safe version of
decode. Acquires a resource, decodes a stream of values, and releases the resource when the returnedStream[F,A]is finished being consumed. If theacquireandreleaseactions are asynchronous, use decodeAsyncResource.- Definition Classes
- StreamDecoder
-
def
drop(n: Long): decode.StreamDecoder[A]
Ignore the first
ndecoded values.Ignore the first
ndecoded values.- Definition Classes
- StreamDecoder
-
def
dropWhile(f: (A) ⇒ Boolean): decode.StreamDecoder[A]
Ignore decoded values as long as the predicate tests true.
Ignore decoded values as long as the predicate tests true.
- Definition Classes
- StreamDecoder
-
final
def
edit[B](f: (Stream[Cursor, A]) ⇒ Stream[Cursor, B]): decode.StreamDecoder[B]
Modify the
Stream[Cursor,A]backing thisStreamDecoder.Modify the
Stream[Cursor,A]backing thisStreamDecoder.- Definition Classes
- StreamDecoder
-
def
edit[B](f: (Step[A]) ⇒ Step[B]): encode.StreamEncoder[B]
Modify the
Pullbacking thisStreamEncoder.Modify the
Pullbacking thisStreamEncoder.- Definition Classes
- StreamEncoder
-
def
editDecoder[O2](f: (StreamDecoder[A]) ⇒ StreamDecoder[O2]): StreamGenCodec[A, O2]
- Definition Classes
- StreamGenCodec
-
def
editEncoder[I2](f: (StreamEncoder[A]) ⇒ StreamEncoder[I2]): StreamGenCodec[I2, A]
- Definition Classes
- StreamGenCodec
-
final
def
encode[F[_]](in: Stream[F, A]): Stream[F, BitVector]
Encode the input stream of
Avalues using thisStreamEncoder.Encode the input stream of
Avalues using thisStreamEncoder.- Definition Classes
- StreamEncoder
-
def
encodeAllValid(in: Seq[A]): BitVector
Encode the given sequence of
Avalues to aBitVector, raising an exception in the event of an encoding error.Encode the given sequence of
Avalues to aBitVector, raising an exception in the event of an encoding error.- Definition Classes
- StreamEncoder
-
def
ensuring(cond: (StreamCodec[A]) ⇒ Boolean, msg: ⇒ Any): StreamCodec[A]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to Ensuring[StreamCodec[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (StreamCodec[A]) ⇒ Boolean): StreamCodec[A]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to Ensuring[StreamCodec[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): StreamCodec[A]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to Ensuring[StreamCodec[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): StreamCodec[A]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to Ensuring[StreamCodec[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exmap[B](f: (A) ⇒ Attempt[B], g: (B) ⇒ Attempt[A]): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
def
exmapc[B](f: (A) ⇒ Attempt[B])(g: (B) ⇒ Attempt[A]): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
def
filter(f: (A) ⇒ Boolean): decode.StreamDecoder[A]
Skip any decoded values for which the predicate tests false.
Skip any decoded values for which the predicate tests false.
- Definition Classes
- StreamDecoder
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
firstAfter(f: (A) ⇒ Boolean): decode.StreamDecoder[A]
Equivalent to
dropWhile(f).take(1)- returns a stream of (at most) one element, consisting of the first output for whichftests false.Equivalent to
dropWhile(f).take(1)- returns a stream of (at most) one element, consisting of the first output for whichftests false.- Definition Classes
- StreamDecoder
-
final
def
flatMap[B](f: (A) ⇒ decode.StreamDecoder[B]): decode.StreamDecoder[B]
Monadic bind for this
StreamDecoder.Monadic bind for this
StreamDecoder. Runs a stream decoder for eachAproduced by thisStreamDecoder, then concatenates all the resulting streams of results. This is the same 'idea' asList.flatMap.- Definition Classes
- StreamDecoder
-
final
def
flatMapS[B](f: (A) ⇒ Stream[Cursor, B]): decode.StreamDecoder[B]
Like
flatMap, but takes a function that produces aStream[Cursor,B].Like
flatMap, but takes a function that produces aStream[Cursor,B].- Definition Classes
- StreamDecoder
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to StringFormat[StreamCodec[A]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
def
fuse[OO >: A](implicit ev: =:=[OO, A]): StreamCodec[OO]
Promote to a
StreamCodec[O]given evidence thatIandOare equal.Promote to a
StreamCodec[O]given evidence thatIandOare equal.- Definition Classes
- StreamGenCodec
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isolate(numberOfBits: Long): decode.StreamDecoder[A]
Alias for
decode.isolate(numberOfBits)(this).Alias for
decode.isolate(numberOfBits)(this).- Definition Classes
- StreamDecoder
-
def
isolateBytes(numberOfBytes: Long): decode.StreamDecoder[A]
Alias for
decode.isolateBytes(numberOfBytes)(this).Alias for
decode.isolateBytes(numberOfBytes)(this).- Definition Classes
- StreamDecoder
-
def
many: StreamCodec[A]
Run this
StreamDecoderzero or more times until the input is exhausted.Run this
StreamDecoderzero or more times until the input is exhausted.- Definition Classes
- StreamCodec → StreamGenCodec → StreamDecoder → StreamEncoder
-
def
many1: decode.StreamDecoder[A]
Run this
StreamDecoderone or more times until the input is exhausted.Run this
StreamDecoderone or more times until the input is exhausted.- Definition Classes
- StreamDecoder
-
final
def
map[B](f: (A) ⇒ B): decode.StreamDecoder[B]
Transform the output of this
StreamDecoderusing the functionf.Transform the output of this
StreamDecoderusing the functionf.- Definition Classes
- StreamDecoder
-
final
def
mapEither[B](f: (A) ⇒ Either[Err, B]): decode.StreamDecoder[B]
Transform the output of this
StreamDecoder, converting left values to decoding failures.Transform the output of this
StreamDecoder, converting left values to decoding failures.- Definition Classes
- StreamDecoder
-
def
narrow[B](f: (A) ⇒ Attempt[B], g: (B) ⇒ A): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
def
narrowc[B](f: (A) ⇒ Attempt[B])(g: (B) ⇒ A): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEmpty(errIfEmpty: Err): decode.StreamDecoder[A]
Raises a decoding error if the given decoder emits no results, otherwise runs
sas normal.Raises a decoding error if the given decoder emits no results, otherwise runs
sas normal.- Definition Classes
- StreamDecoder
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
or[A2 >: A](d: decode.StreamDecoder[A2]): decode.StreamDecoder[A2]
Alias for
scodec.stream.decode.or(this,d).Alias for
scodec.stream.decode.or(this,d). Runsthis, then runsdifthisemits no elements. Example:tryOnce(codecs.int32).or(once(codecs.uint32)). This function does no backtracking of its own; any desired backtracking should be handled bythis.- Definition Classes
- StreamDecoder
-
def
or(other: encode.StreamEncoder[A]): encode.StreamEncoder[A]
- Definition Classes
- StreamEncoder
-
def
peek: decode.StreamDecoder[A]
Alias for
scodec.stream.decode.peek(this).Alias for
scodec.stream.decode.peek(this).- Definition Classes
- StreamDecoder
-
val
self: StreamCodec[A]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
def
sepBy[B](implicit B: Lazy[Decoder[B]]): decode.StreamDecoder[A]
Alternate between decoding
Avalues using thisStreamDecoder, and decodingBvalues which are ignored.Alternate between decoding
Avalues using thisStreamDecoder, and decodingBvalues which are ignored.- Definition Classes
- StreamDecoder
-
final
def
strict: Decoder[Vector[A]]
Create a strict (i.e., non-stream) decoder.
Create a strict (i.e., non-stream) decoder.
- Definition Classes
- StreamDecoder
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
take(n: Long): StreamCodec[A]
Decode at most
nvalues using thisStreamDecoder.Decode at most
nvalues using thisStreamDecoder.- Definition Classes
- StreamCodec → StreamGenCodec → StreamDecoder → StreamEncoder
-
def
takeWhile(f: (A) ⇒ Boolean): decode.StreamDecoder[A]
Decode values as long as the predicate tests true.
Decode values as long as the predicate tests true.
- Definition Classes
- StreamDecoder
-
final
def
through[B](p: Pipe[Cursor, A, B]): decode.StreamDecoder[B]
Transform the output of this
StreamDecoderusing the given pipe.Transform the output of this
StreamDecoderusing the given pipe.- Definition Classes
- StreamDecoder
-
final
def
through2[B, C](d: decode.StreamDecoder[B])(t: Pipe2[Cursor, A, B, C]): decode.StreamDecoder[C]
Combine the output of this
StreamDecoderwith another streaming decoder, using the given binary stream transducer.Combine the output of this
StreamDecoderwith another streaming decoder, using the given binary stream transducer. Note that bothdandthiswill operate on the same inputBitVector, so this combinator is more useful for expressing alternation between two decoders.- Definition Classes
- StreamDecoder
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
widen[B](f: (A) ⇒ B, g: (B) ⇒ Attempt[A]): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
def
widenOpt[B](f: (A) ⇒ B, g: (B) ⇒ Option[A]): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
def
widenOptc[B](f: (A) ⇒ B)(g: (B) ⇒ Option[A]): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
def
widenc[B](f: (A) ⇒ B)(g: (B) ⇒ Attempt[A]): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
def
withFilter(f: (A) ⇒ Boolean): decode.StreamDecoder[A]
Skip any decoded values for which the predicate tests false.
Skip any decoded values for which the predicate tests false.
- Definition Classes
- StreamDecoder
-
def
xmap[B](f: (A) ⇒ B, g: (B) ⇒ A): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
-
final
def
xmapc[B](f: (A) ⇒ B)(g: (B) ⇒ A): encode.StreamEncoder[B]
Transform the input type of this
StreamEncoder.Transform the input type of this
StreamEncoder.- Definition Classes
- StreamEncoder
-
final
def
|[A2 >: A](d: decode.StreamDecoder[A2]): decode.StreamDecoder[A2]
Operator alias for
this.or(d).Operator alias for
this.or(d).- Definition Classes
- StreamDecoder
-
def
→[B](y: B): (StreamCodec[A], B)
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to ArrowAssoc[StreamCodec[A]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
Shadowed Implicit Value Members
-
def
xmapc[B](f: (A) ⇒ B)(g: (B) ⇒ A): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(streamCodec: TransformSyntax[StreamCodec, A]).xmapc(f)(g)
- Definition Classes
- TransformSyntax
Deprecated Value Members
-
def
pxmap[B](f: (A) ⇒ B, g: (B) ⇒ Option[A]): StreamCodec[B]
- Implicit
- This member is added by an implicit conversion from StreamCodec[A] to TransformSyntax[StreamCodec, A] performed by method TransformSyntax in scodec. This conversion will take place only if an implicit value of type Transform[StreamCodec] is in scope.
- Definition Classes
- TransformSyntax
- Annotations
- @deprecated
- Deprecated
(Since version 1.7.0) Use widenOpt instead