We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9613021 commit 5475378Copy full SHA for 5475378
src/binary.ts
@@ -62,6 +62,13 @@ export class Binary {
62
position!: number;
63
64
/**
65
+ * Create a new Binary instance.
66
+ *
67
+ * This constructor can accept a string as its first argument. In this case,
68
+ * this string will be encoded using ISO-8859-1, **not** using UTF-8.
69
+ * This is almost certainly not what you want. Use `new Binary(Buffer.from(string))`
70
+ * instead to convert the string to a Buffer using UTF-8 first.
71
72
* @param buffer - a buffer object containing the binary data.
73
* @param subType - the option binary type.
74
*/
0 commit comments