On Apr 22, 02014, at 20:29, Mike Kobyakov <[email protected]> wrote:
> i have two services (one in node, one in java) sharing objects, which are
> compressed and, therefore, binary.
>
> nodejs does a str.toString('binary') on the compressed buffer. this changes
> the buffer as in the following example.
>
> enc [ -108 1 72 116 104 105 115 32 105 115 32 116 104 101 32 115 116 114
> 105 110 103 32 70 19 0 70 18 0 -2 37 0 114 37 0 ]
>
> enc.toString('binary') [ -62 -108 1 72 116 104 105 115 32 105 115 32 116
> 104 101 32 115 116 114 105 110 103 32 70 19 0 70 18 0 -61 -66 37 0 114 37 0 ]
>
> unfortunately, it appears that negative bytes become two negative bytes in
> 'binary' encoding, and i cannot find a java charset that can translate the
> latter into the former.
>
>
Wait, “Negative bytes”?!
That’s not a thing node does. Where is this object coming from and what kind is
it?
signature.asc
Description: Message signed with OpenPGP using GPGMail
