File tree Expand file tree Collapse file tree 4 files changed +22
-1
lines changed
Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 17521752 return out . flip ( ) ;
17531753 } ;
17541754
1755+ // NOTE on binary strings: Binary strings as used here have nothing to do with frequently asked questions about
1756+ // conversion between ArrayBuffer and String. What we do here is what libraries like node-forge do to simulate a
1757+ // byte buffer: Conversion between 8 bit unsigned integers and the low 8 bit UTF8/UCS2 characters. This is not
1758+ // perfect as it effectively uses 16 bit per character in memory to store the 8 bit values, but that's not our
1759+ // concern as we just want it to be compatible. It's always better to use ArrayBuffer/Buffer (!) while base64
1760+ // and hex should be slightly worse regarding memory consumption and encoding speed.
1761+
17551762 /**
17561763 * Encodes a ByteBuffer to a binary string. A binary string in this case is a string composed of 8bit values
17571764 * as characters with a char code between 0 and 255 inclusive.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 16611661 return out . flip ( ) ;
16621662 } ;
16631663
1664+ // NOTE on binary strings: Binary strings as used here have nothing to do with frequently asked questions about
1665+ // conversion between ArrayBuffer and String. What we do here is what libraries like node-forge do to simulate a
1666+ // byte buffer: Conversion between 8 bit unsigned integers and the low 8 bit UTF8/UCS2 characters. This is not
1667+ // perfect as it effectively uses 16 bit per character in memory to store the 8 bit values, but that's not our
1668+ // concern as we just want it to be compatible. It's always better to use ArrayBuffer/Buffer (!) while base64
1669+ // and hex should be slightly worse regarding memory consumption and encoding speed.
1670+
16641671 /**
16651672 * Encodes a ByteBuffer to a binary string. A binary string in this case is a string composed of 8bit values
16661673 * as characters with a char code between 0 and 255 inclusive.
Original file line number Diff line number Diff line change 17521752 return out . flip ( ) ;
17531753 } ;
17541754
1755+ // NOTE on binary strings: Binary strings as used here have nothing to do with frequently asked questions about
1756+ // conversion between ArrayBuffer and String. What we do here is what libraries like node-forge do to simulate a
1757+ // byte buffer: Conversion between 8 bit unsigned integers and the low 8 bit UTF8/UCS2 characters. This is not
1758+ // perfect as it effectively uses 16 bit per character in memory to store the 8 bit values, but that's not our
1759+ // concern as we just want it to be compatible. It's always better to use ArrayBuffer/Buffer (!) while base64
1760+ // and hex should be slightly worse regarding memory consumption and encoding speed.
1761+
17551762 /**
17561763 * Encodes a ByteBuffer to a binary string. A binary string in this case is a string composed of 8bit values
17571764 * as characters with a char code between 0 and 255 inclusive.
You can’t perform that action at this time.
0 commit comments