git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] stevedlawrence commented on a change in pull request #61: Preliminary Review - Base64 layering runs first parsing unit test.


stevedlawrence commented on a change in pull request #61: Preliminary Review - Base64 layering runs first parsing unit test.
URL: https://github.com/apache/incubator-daffodil/pull/61#discussion_r181430316
 
 

 ##########
 File path: daffodil-io/src/main/scala/org/apache/daffodil/processors/charset/USASCII6BitPackedDecoder.scala
 ##########
 @@ -26,15 +26,26 @@ import org.apache.daffodil.schema.annotation.props.gen.BitOrder
  * code unit.
  *
  */
-
-object USASCII6BitPackedCharset
-  extends NBitsWidth_BitsCharset("X-DFDL-US-ASCII-6-BIT-PACKED",
+private[charset] class USASCII6BitPacked(bitOrder: BitOrder, override val name: String)
+  extends NBitsWidth_BitsCharset(name,
     """@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ !"#$%&'()*+,-./0123456789:;<=>?""",
     6, // width
-    BitOrder.LeastSignificantBitFirst,
+    bitOrder,
     0x1F) { // replacement charCode for encoding of unmapped chars.
   //
   // Note: formula for computing string above is
   // def decodeString = ((0 to 63).map { charCode => (if (charCode <= 31) charCode + 64 else charCode).toChar }).mkString
 }
 
+object USASCII6BitPackedLSBFirstCharset
+  extends USASCII6BitPacked(BitOrder.LeastSignificantBitFirst,
+    "X-DFDL-US-ASCII-6-BIT-PACKED-LSB-FIRST")
+
+object USASCII6BitPackedCharset
+  extends USASCII6BitPacked(BitOrder.LeastSignificantBitFirst,
+    "X-DFDL-US-ASCII-6-BIT-PACKED") // just an alias for the the "LSB-FIRST variant.
 
 Review comment:
   Do we have a way to deprecate enodings? Might be worth it to remove future confusion.

----------------------------------------------------------------
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:
users@xxxxxxxxxxxxxxxx


With regards,
Apache Git Services