@@ -147,35 +147,35 @@ Prefer using strict throwing methods for cryptography applications._
147147
148148UTF-16 encoding/decoding
149149
150- _ These methods by design encode/decode BOM (codepoint ` U+FEFF ` Byte Order Mark) as-is._
151- _ If you need BOM handling or detection, use ` @exodus/bytes/encoding.js ` _
152-
153150``` js
154151import { utf16fromString , utf16toString } from ' @exodus/bytes/utf16.js'
155152
156153// loose
157154import { utf16fromStringLoose , utf16toStringLoose } from ' @exodus/bytes/utf16.js'
158155```
159156
157+ _ These methods by design encode/decode BOM (codepoint ` U+FEFF ` Byte Order Mark) as-is._
158+ _ If you need BOM handling or detection, use ` @exodus/bytes/encoding.js ` _
159+
160160#### ` utf16fromString(string, format = 'uint16') `
161161#### ` utf16fromStringLoose(string, format = 'uint16') `
162162#### ` utf16toString(arr, 'uint16') `
163163#### ` utf16toStringLoose(arr, 'uint16') `
164164
165165### ` @exodus/bytes/single-byte.js `
166166
167- ``` js
168- import { createSinglebyteDecoder , createSinglebyteEncoder } from ' @exodus/bytes/single-byte.js'
169- import { windows1252toString , windows1252fromString } from ' @exodus/bytes/single-byte.js'
170- import { latin1toString , latin1fromString } from ' @exodus/bytes/single-byte.js'
171- ```
172-
173167Decode / encode the legacy single-byte encodings according to the
174168[ Encoding standard] ( https://encoding.spec.whatwg.org/ )
175169([ §9] ( https://encoding.spec.whatwg.org/#legacy-single-byte-encodings ) ,
176170[ §14.5] ( https://encoding.spec.whatwg.org/#x-user-defined ) ),
177171and [ unicode.org] ( https://unicode.org/Public/MAPPINGS/ISO8859 ) ` iso-8859-* ` mappings.
178172
173+ ``` js
174+ import { createSinglebyteDecoder , createSinglebyteEncoder } from ' @exodus/bytes/single-byte.js'
175+ import { windows1252toString , windows1252fromString } from ' @exodus/bytes/single-byte.js'
176+ import { latin1toString , latin1fromString } from ' @exodus/bytes/single-byte.js'
177+ ```
178+
179179Supports all single-byte encodings listed in the WHATWG Encoding standard:
180180` ibm866 ` , ` iso-8859-2 ` , ` iso-8859-3 ` , ` iso-8859-4 ` , ` iso-8859-5 ` , ` iso-8859-6 ` , ` iso-8859-7 ` , ` iso-8859-8 ` ,
181181` iso-8859-8-i ` , ` iso-8859-10 ` , ` iso-8859-13 ` , ` iso-8859-14 ` , ` iso-8859-15 ` , ` iso-8859-16 ` , ` koi8-r ` , ` koi8-u ` ,
0 commit comments