Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

GridBinaryMarshaller already transforms objects to the bytes. 

And, all we need is to transform and wrap these bytes.

...

and the idea is just to transform the given array somehow and add a special prefix GridBinaryMarshaller#TRANSFORMED == -1 at the beginning to make it distinguishable from untransformed data.

...

  • No-op transformer will produce [-1, 0, 0, 0, 0, 5, 3, 42, 0, 0, 0] or [-1, 0, 0, 0, 0, 16, 9, 11, 0, 0, 0, 84, 101, 115, 116, 32, 115, 116, 114, 105, 110, 103], where [0, 0, 0, 0, 5] and [0, 0, 0, 0, 16] is an original array size.
  • PseudoThe pseudo-Crypto transformer, which adds 1 to every original byte, will produce will produce [-1, 0, 0, 0, 0, 6, 4, 43, 1, 1, 1] or [-1, 0, 0, 0, 0, 16, 10, 12, 1, 1, 1, 85, 102, 116, 117, 33, 116, 117, 115, 106, 111, 104]
  • Magic-Compressor will produce [-1, 0, 0, 0, 0, 5, 7] or [-1, 0, 0, 0, 0, 16, 17], where 7 and 17 is a are the result of a magic compression.

...