stevedlawrence commented on a change in pull request #163: Fix performance
issues with recent hexBinary changes
URL: https://github.com/apache/incubator-daffodil/pull/163#discussion_r247876032
##########
File path:
daffodil-io/src/main/scala/org/apache/daffodil/io/InputSourceDataInputStream.scala
##########
@@ -156,170 +156,125 @@ final class InputSourceDataInputStream private (val
inputSource: InputSource)
/**
* Accepts a preallocated array and a bitLength. Reads the specified number
- * of bits and stores them in the array in big endian byte order and most
- * significant bit first bit order. The most significant byte is stored in
- * the zero'th index in the array. This means that if the array is larger
- * than the number of bytes needed for the specified number of bits, the
- * trailing bytes will be untouched and should be ignored by the caller.
+ * of bits and stores them in the array based on byteOrder and bitOrder,
+ * resulting in an array consistent with hexBinary data. If there are
+ * fragment bytes the last bits are placed appropriately based on bitOrder.
+ * For example, assuming a bitLength of 19, the resulting array will be
+ * filled like so,
+ *
+ * BE MSBF: 01234567 01234567 012xxxxx
+ * BE LSBF: 76543210 76543210 xxxxx210
+ *
+ * Little endian is the exact same, but with the bytes reversed, like so:
+ *
+ * LE MSBF: 012xxxxx 01234567 01234567
Review comment:
Ok, I'll clairfy this. I'll create a "raw data" kindof thing with less
repedition and change these to show what the result would be.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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