This repository has been archived by the owner on Oct 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Combination of stream decoders doesn't emit all expected items #169
Comments
What version of scodec-stream are you using? Using 2.x or 3.x gives the expected behavior: scala> decoder.decode[Fallible](Stream(hex"1a bc d7 ab 7a bc".bits)).compile.fold(BitVector.empty)(_ ++ _)
val res7: Either[Throwable, scodec.bits.BitVector] = Right(BitVector(36 bits, 0xabcdababc)) |
I don't see how your example is equivalent to mine. Here is my scalaVersion := "2.13.6"
libraryDependencies ++= Seq(
"org.scodec" %% "scodec-stream" % "3.0.1",
)
|
Okay yeah, I can reproduce your results if I chunk up the input in to an individual scala> decoder.decode[Fallible](Stream.emits(hex"1a bc d7 ab 7a bc".toArray.map(BitVector.apply(_)))).compile.fold(BitVector.empty)(_ ++ _)
val res9: Either[Throwable, scodec.bits.BitVector] = Right(BitVector(16 bits, 0xabcd)) |
Fixed in 3.0.2 and 2.0.3, which are releasing now and should be available for download within the hour. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Output of the following program is
abcd
, while according to my understanding it should beabcdababc
. Am I missing something?The text was updated successfully, but these errors were encountered: