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_r247875751
##########
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,
Review comment:
I'll try to clarify this in the comments. It's correct that hexBInary
ignores byteOrder and is always bigEndian. But *if* we were allowed have a
"little endian hexbinary", then this function would return the right thing
(I.e. the bigEndian bytes, but reversed). The reason being that this function
is used by other functions (e.g. getUnsignedLong) which *do* allow little
endian byte order.
----------------------------------------------------------------
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