olabusayoT commented on a change in pull request #258: Adds bitawareness to
left over data dump
URL: https://github.com/apache/incubator-daffodil/pull/258#discussion_r301828211
##########
File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
##########
@@ -908,21 +911,36 @@ object Main extends Logging {
} else {
// not streaming, show left over data warning
val Dump = new DataDumper
- val curPositionInByte0b = inStream.inputSource.position
+ val firstByteBitArray = new Array[Byte](1)
+ val bitsAlreadyConsumed = loc.bitPos0b % 8
+ val firstByteString = if (bitsAlreadyConsumed != 0) {
+ val bitsToDisplay = 8 - bitsAlreadyConsumed
+ val pbp = inStream.inputSource.position + 1
+ inStream.fillByteArray(firstByteBitArray, bitsToDisplay,
finfo)
Review comment:
Yes, I missed that function during the first go round. I've made the updates!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services