@grain/stdlib 0.6.6 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/LICENSE +1 -1
  3. package/README.md +2 -2
  4. package/array.gr +55 -7
  5. package/array.md +606 -560
  6. package/bigint.md +228 -228
  7. package/buffer.gr +85 -53
  8. package/buffer.md +442 -319
  9. package/bytes.gr +112 -35
  10. package/bytes.md +299 -219
  11. package/char.gr +201 -99
  12. package/char.md +447 -120
  13. package/exception.gr +11 -11
  14. package/exception.md +29 -4
  15. package/float32.gr +327 -3
  16. package/float32.md +698 -111
  17. package/float64.gr +320 -3
  18. package/float64.md +698 -111
  19. package/fs.gr +1082 -0
  20. package/fs.md +630 -0
  21. package/hash.gr +142 -88
  22. package/hash.md +105 -17
  23. package/int16.md +178 -178
  24. package/int32.gr +26 -5
  25. package/int32.md +266 -231
  26. package/int64.gr +27 -2
  27. package/int64.md +266 -231
  28. package/int8.md +178 -178
  29. package/json.gr +366 -51
  30. package/json.md +431 -15
  31. package/list.gr +328 -31
  32. package/list.md +759 -336
  33. package/map.gr +20 -12
  34. package/map.md +266 -260
  35. package/marshal.gr +41 -40
  36. package/marshal.md +14 -14
  37. package/number.gr +278 -35
  38. package/number.md +688 -269
  39. package/option.md +162 -162
  40. package/package.json +5 -3
  41. package/path.gr +48 -0
  42. package/path.md +180 -89
  43. package/pervasives.gr +2 -2
  44. package/pervasives.md +275 -275
  45. package/priorityqueue.gr +7 -7
  46. package/priorityqueue.md +131 -131
  47. package/queue.gr +183 -29
  48. package/queue.md +404 -148
  49. package/random.md +43 -43
  50. package/range.gr +4 -4
  51. package/range.md +42 -42
  52. package/rational.md +123 -123
  53. package/regex.gr +52 -51
  54. package/regex.md +102 -102
  55. package/result.md +118 -118
  56. package/runtime/atof/common.md +39 -39
  57. package/runtime/atof/decimal.gr +6 -6
  58. package/runtime/atof/decimal.md +14 -14
  59. package/runtime/atof/lemire.gr +5 -5
  60. package/runtime/atof/lemire.md +1 -1
  61. package/runtime/atof/parse.gr +16 -16
  62. package/runtime/atof/parse.md +2 -2
  63. package/runtime/atof/slow.md +1 -1
  64. package/runtime/atof/table.md +2 -2
  65. package/runtime/atoi/parse.gr +3 -3
  66. package/runtime/atoi/parse.md +1 -1
  67. package/runtime/bigint.gr +15 -47
  68. package/runtime/bigint.md +54 -60
  69. package/runtime/compare.gr +2 -2
  70. package/runtime/compare.md +8 -8
  71. package/runtime/dataStructures.md +211 -211
  72. package/runtime/debugPrint.gr +4 -1
  73. package/runtime/debugPrint.md +9 -9
  74. package/runtime/equal.gr +99 -77
  75. package/runtime/equal.md +8 -8
  76. package/runtime/exception.gr +62 -82
  77. package/runtime/exception.md +62 -11
  78. package/runtime/gc.gr +39 -45
  79. package/runtime/gc.md +4 -4
  80. package/runtime/malloc.gr +7 -7
  81. package/runtime/malloc.md +13 -13
  82. package/runtime/math/kernel/cos.gr +70 -0
  83. package/runtime/math/kernel/cos.md +14 -0
  84. package/runtime/math/kernel/sin.gr +65 -0
  85. package/runtime/math/kernel/sin.md +14 -0
  86. package/runtime/math/kernel/tan.gr +136 -0
  87. package/runtime/math/kernel/tan.md +14 -0
  88. package/runtime/math/rempio2.gr +244 -0
  89. package/runtime/math/rempio2.md +14 -0
  90. package/runtime/math/trig.gr +130 -0
  91. package/runtime/math/trig.md +28 -0
  92. package/runtime/math/umuldi.gr +26 -0
  93. package/runtime/math/umuldi.md +14 -0
  94. package/runtime/numberUtils.gr +29 -29
  95. package/runtime/numberUtils.md +12 -12
  96. package/runtime/numbers.gr +373 -381
  97. package/runtime/numbers.md +348 -342
  98. package/runtime/string.gr +37 -105
  99. package/runtime/string.md +20 -26
  100. package/runtime/unsafe/constants.md +24 -24
  101. package/runtime/unsafe/conv.md +19 -19
  102. package/runtime/unsafe/memory.gr +24 -20
  103. package/runtime/unsafe/memory.md +27 -7
  104. package/runtime/unsafe/offsets.gr +36 -0
  105. package/runtime/unsafe/offsets.md +88 -0
  106. package/runtime/unsafe/panic.gr +28 -0
  107. package/runtime/unsafe/panic.md +14 -0
  108. package/runtime/unsafe/tags.md +32 -32
  109. package/runtime/unsafe/wasmf32.md +28 -28
  110. package/runtime/unsafe/wasmf64.md +28 -28
  111. package/runtime/unsafe/wasmi32.md +47 -47
  112. package/runtime/unsafe/wasmi64.md +50 -50
  113. package/runtime/utf8.gr +189 -0
  114. package/runtime/utf8.md +117 -0
  115. package/runtime/wasi.gr +4 -2
  116. package/runtime/wasi.md +147 -147
  117. package/set.gr +18 -11
  118. package/set.md +253 -247
  119. package/stack.gr +171 -2
  120. package/stack.md +371 -89
  121. package/string.gr +352 -557
  122. package/string.md +298 -255
  123. package/uint16.md +170 -170
  124. package/uint32.gr +25 -4
  125. package/uint32.md +249 -214
  126. package/uint64.gr +25 -5
  127. package/uint64.md +249 -214
  128. package/uint8.md +170 -170
  129. package/uri.gr +57 -53
  130. package/uri.md +88 -89
  131. package/wasi/file.gr +67 -59
  132. package/wasi/file.md +308 -308
  133. package/wasi/process.md +26 -26
  134. package/wasi/random.md +12 -12
  135. package/wasi/time.md +16 -16
  136. package/runtime/utils/printing.gr +0 -60
  137. package/runtime/utils/printing.md +0 -26
package/buffer.md CHANGED
@@ -41,7 +41,7 @@ No other changes yet.
41
41
  </details>
42
42
 
43
43
  ```grain
44
- make : (initialSize: Number) => Buffer
44
+ make: (initialSize: Number) => Buffer
45
45
  ```
46
46
 
47
47
  Creates a fresh buffer, initially empty.
@@ -51,15 +51,15 @@ That byte sequence is automatically reallocated when more than `initialSize` byt
51
51
 
52
52
  Parameters:
53
53
 
54
- |param|type|description|
55
- |-----|----|-----------|
56
- |`initialSize`|`Number`|The initial size of the buffer|
54
+ | param | type | description |
55
+ | ------------- | -------- | ------------------------------ |
56
+ | `initialSize` | `Number` | The initial size of the buffer |
57
57
 
58
58
  Returns:
59
59
 
60
- |type|description|
61
- |----|-----------|
62
- |`Buffer`|The new buffer|
60
+ | type | description |
61
+ | -------- | -------------- |
62
+ | `Buffer` | The new buffer |
63
63
 
64
64
  Throws:
65
65
 
@@ -85,22 +85,22 @@ No other changes yet.
85
85
  </details>
86
86
 
87
87
  ```grain
88
- length : (buffer: Buffer) => Number
88
+ length: (buffer: Buffer) => Number
89
89
  ```
90
90
 
91
91
  Gets the number of bytes currently contained in a buffer.
92
92
 
93
93
  Parameters:
94
94
 
95
- |param|type|description|
96
- |-----|----|-----------|
97
- |`buffer`|`Buffer`|The buffer to access|
95
+ | param | type | description |
96
+ | -------- | -------- | -------------------- |
97
+ | `buffer` | `Buffer` | The buffer to access |
98
98
 
99
99
  Returns:
100
100
 
101
- |type|description|
102
- |----|-----------|
103
- |`Number`|The length of the buffer in bytes|
101
+ | type | description |
102
+ | -------- | --------------------------------- |
103
+ | `Number` | The length of the buffer in bytes |
104
104
 
105
105
  Examples:
106
106
 
@@ -122,7 +122,7 @@ No other changes yet.
122
122
  </details>
123
123
 
124
124
  ```grain
125
- clear : (buffer: Buffer) => Void
125
+ clear: (buffer: Buffer) => Void
126
126
  ```
127
127
 
128
128
  Clears data in the buffer and sets its length to zero.
@@ -131,9 +131,9 @@ This operation does not resize the underlying byte sequence.
131
131
 
132
132
  Parameters:
133
133
 
134
- |param|type|description|
135
- |-----|----|-----------|
136
- |`buffer`|`Buffer`|The buffer to clear|
134
+ | param | type | description |
135
+ | -------- | -------- | ------------------- |
136
+ | `buffer` | `Buffer` | The buffer to clear |
137
137
 
138
138
  Examples:
139
139
 
@@ -153,7 +153,7 @@ No other changes yet.
153
153
  </details>
154
154
 
155
155
  ```grain
156
- reset : (buffer: Buffer) => Void
156
+ reset: (buffer: Buffer) => Void
157
157
  ```
158
158
 
159
159
  Empty a buffer and deallocate the internal byte sequence holding the buffer contents.
@@ -162,9 +162,9 @@ This operation resizes the underlying byte sequence to the initial size of the b
162
162
 
163
163
  Parameters:
164
164
 
165
- |param|type|description|
166
- |-----|----|-----------|
167
- |`buffer`|`Buffer`|The buffer to reset|
165
+ | param | type | description |
166
+ | -------- | -------- | ------------------- |
167
+ | `buffer` | `Buffer` | The buffer to reset |
168
168
 
169
169
  Examples:
170
170
 
@@ -184,7 +184,7 @@ No other changes yet.
184
184
  </details>
185
185
 
186
186
  ```grain
187
- truncate : (length: Number, buffer: Buffer) => Void
187
+ truncate: (length: Number, buffer: Buffer) => Void
188
188
  ```
189
189
 
190
190
  Shortens a buffer to the given length.
@@ -193,10 +193,10 @@ This operation does not resize the underlying byte sequence.
193
193
 
194
194
  Parameters:
195
195
 
196
- |param|type|description|
197
- |-----|----|-----------|
198
- |`length`|`Number`|The number of bytes to truncate the buffer to|
199
- |`buffer`|`Buffer`|The buffer to truncate|
196
+ | param | type | description |
197
+ | -------- | -------- | --------------------------------------------- |
198
+ | `length` | `Number` | The number of bytes to truncate the buffer to |
199
+ | `buffer` | `Buffer` | The buffer to truncate |
200
200
 
201
201
  Throws:
202
202
 
@@ -223,22 +223,22 @@ No other changes yet.
223
223
  </details>
224
224
 
225
225
  ```grain
226
- toBytes : (buffer: Buffer) => Bytes
226
+ toBytes: (buffer: Buffer) => Bytes
227
227
  ```
228
228
 
229
229
  Returns a copy of the current contents of the buffer as a byte sequence.
230
230
 
231
231
  Parameters:
232
232
 
233
- |param|type|description|
234
- |-----|----|-----------|
235
- |`buffer`|`Buffer`|The buffer to copy into a byte sequence|
233
+ | param | type | description |
234
+ | -------- | -------- | --------------------------------------- |
235
+ | `buffer` | `Buffer` | The buffer to copy into a byte sequence |
236
236
 
237
237
  Returns:
238
238
 
239
- |type|description|
240
- |----|-----------|
241
- |`Bytes`|A byte sequence made from copied buffer data|
239
+ | type | description |
240
+ | ------- | -------------------------------------------- |
241
+ | `Bytes` | A byte sequence made from copied buffer data |
242
242
 
243
243
  Examples:
244
244
 
@@ -256,24 +256,24 @@ No other changes yet.
256
256
  </details>
257
257
 
258
258
  ```grain
259
- toBytesSlice : (start: Number, length: Number, buffer: Buffer) => Bytes
259
+ toBytesSlice: (start: Number, length: Number, buffer: Buffer) => Bytes
260
260
  ```
261
261
 
262
262
  Returns a slice of the current contents of the buffer as a byte sequence.
263
263
 
264
264
  Parameters:
265
265
 
266
- |param|type|description|
267
- |-----|----|-----------|
268
- |`start`|`Number`|The start index|
269
- |`length`|`Number`|The number of bytes to include after the starting index|
270
- |`buffer`|`Buffer`|The buffer to copy from|
266
+ | param | type | description |
267
+ | -------- | -------- | ------------------------------------------------------- |
268
+ | `start` | `Number` | The start index |
269
+ | `length` | `Number` | The number of bytes to include after the starting index |
270
+ | `buffer` | `Buffer` | The buffer to copy from |
271
271
 
272
272
  Returns:
273
273
 
274
- |type|description|
275
- |----|-----------|
276
- |`Bytes`|A byte sequence with bytes copied from the buffer|
274
+ | type | description |
275
+ | ------- | ------------------------------------------------- |
276
+ | `Bytes` | A byte sequence with bytes copied from the buffer |
277
277
 
278
278
  Throws:
279
279
 
@@ -299,22 +299,22 @@ No other changes yet.
299
299
  </details>
300
300
 
301
301
  ```grain
302
- toString : (buffer: Buffer) => String
302
+ toString: (buffer: Buffer) => String
303
303
  ```
304
304
 
305
305
  Returns a copy of the current contents of the buffer as a string.
306
306
 
307
307
  Parameters:
308
308
 
309
- |param|type|description|
310
- |-----|----|-----------|
311
- |`buffer`|`Buffer`|The buffer to stringify|
309
+ | param | type | description |
310
+ | -------- | -------- | ----------------------- |
311
+ | `buffer` | `Buffer` | The buffer to stringify |
312
312
 
313
313
  Returns:
314
314
 
315
- |type|description|
316
- |----|-----------|
317
- |`String`|A string made with data copied from the buffer|
315
+ | type | description |
316
+ | -------- | ---------------------------------------------- |
317
+ | `String` | A string made with data copied from the buffer |
318
318
 
319
319
  Examples:
320
320
 
@@ -332,24 +332,24 @@ No other changes yet.
332
332
  </details>
333
333
 
334
334
  ```grain
335
- toStringSlice : (start: Number, length: Number, buffer: Buffer) => String
335
+ toStringSlice: (start: Number, length: Number, buffer: Buffer) => String
336
336
  ```
337
337
 
338
338
  Returns a copy of a subset of the current contents of the buffer as a string.
339
339
 
340
340
  Parameters:
341
341
 
342
- |param|type|description|
343
- |-----|----|-----------|
344
- |`start`|`Number`|The start index|
345
- |`length`|`Number`|The number of bytes to include after the starting index|
346
- |`buffer`|`Buffer`|The buffer to copy from|
342
+ | param | type | description |
343
+ | -------- | -------- | ------------------------------------------------------- |
344
+ | `start` | `Number` | The start index |
345
+ | `length` | `Number` | The number of bytes to include after the starting index |
346
+ | `buffer` | `Buffer` | The buffer to copy from |
347
347
 
348
348
  Returns:
349
349
 
350
- |type|description|
351
- |----|-----------|
352
- |`String`|A string made with a subset of data copied from the buffer|
350
+ | type | description |
351
+ | -------- | ---------------------------------------------------------- |
352
+ | `String` | A string made with a subset of data copied from the buffer |
353
353
 
354
354
  Examples:
355
355
 
@@ -367,17 +367,17 @@ No other changes yet.
367
367
  </details>
368
368
 
369
369
  ```grain
370
- addBytes : (bytes: Bytes, buffer: Buffer) => Void
370
+ addBytes: (bytes: Bytes, buffer: Buffer) => Void
371
371
  ```
372
372
 
373
373
  Appends a byte sequence to a buffer.
374
374
 
375
375
  Parameters:
376
376
 
377
- |param|type|description|
378
- |-----|----|-----------|
379
- |`bytes`|`Bytes`|The byte sequence to append|
380
- |`buffer`|`Buffer`|The buffer to mutate|
377
+ | param | type | description |
378
+ | -------- | -------- | --------------------------- |
379
+ | `bytes` | `Bytes` | The byte sequence to append |
380
+ | `buffer` | `Buffer` | The buffer to mutate |
381
381
 
382
382
  Examples:
383
383
 
@@ -395,17 +395,17 @@ No other changes yet.
395
395
  </details>
396
396
 
397
397
  ```grain
398
- addString : (string: String, buffer: Buffer) => Void
398
+ addString: (string: String, buffer: Buffer) => Void
399
399
  ```
400
400
 
401
401
  Appends the bytes of a string to a buffer.
402
402
 
403
403
  Parameters:
404
404
 
405
- |param|type|description|
406
- |-----|----|-----------|
407
- |`string`|`String`|The string to append|
408
- |`buffer`|`Buffer`|The buffer to mutate|
405
+ | param | type | description |
406
+ | -------- | -------- | -------------------- |
407
+ | `string` | `String` | The string to append |
408
+ | `buffer` | `Buffer` | The buffer to mutate |
409
409
 
410
410
  Examples:
411
411
 
@@ -415,6 +415,51 @@ Buffer.addString("Hello", buf)
415
415
  assert Buffer.toString(buf) == "Hello"
416
416
  ```
417
417
 
418
+ ### Buffer.**getChar**
419
+
420
+ <details disabled>
421
+ <summary tabindex="-1">Added in <code>0.7.1</code></summary>
422
+ No other changes yet.
423
+ </details>
424
+
425
+ ```grain
426
+ getChar: (index: Number, buffer: Buffer) => Char
427
+ ```
428
+
429
+ Gets the UTF-8 encoded character at the given byte index.
430
+
431
+ Parameters:
432
+
433
+ | param | type | description |
434
+ | -------- | -------- | ------------------------ |
435
+ | `index` | `Number` | The byte index to access |
436
+ | `buffer` | `Buffer` | The buffer to access |
437
+
438
+ Returns:
439
+
440
+ | type | description |
441
+ | ------ | --------------------------------------- |
442
+ | `Char` | A character starting at the given index |
443
+
444
+ Throws:
445
+
446
+ `IndexOutOfBounds`
447
+
448
+ * When `index` is negative
449
+ * When `index + 1` is greater than the buffer size
450
+
451
+ `MalformedUnicode`
452
+
453
+ * When the bytes at the index are not a valid UTF-8 sequence
454
+
455
+ Examples:
456
+
457
+ ```grain
458
+ let buf = Buffer.make(32)
459
+ Buffer.addString("Hello World 🌾", buf)
460
+ assert Buffer.getChar(12, buf) == '🌾'
461
+ ```
462
+
418
463
  ### Buffer.**addChar**
419
464
 
420
465
  <details disabled>
@@ -423,17 +468,17 @@ No other changes yet.
423
468
  </details>
424
469
 
425
470
  ```grain
426
- addChar : (char: Char, buffer: Buffer) => Void
471
+ addChar: (char: Char, buffer: Buffer) => Void
427
472
  ```
428
473
 
429
474
  Appends the bytes of a character to a buffer.
430
475
 
431
476
  Parameters:
432
477
 
433
- |param|type|description|
434
- |-----|----|-----------|
435
- |`char`|`Char`|The character to append to the buffer|
436
- |`buffer`|`Buffer`|The buffer to mutate|
478
+ | param | type | description |
479
+ | -------- | -------- | ------------------------------------- |
480
+ | `char` | `Char` | The character to append to the buffer |
481
+ | `buffer` | `Buffer` | The buffer to mutate |
437
482
 
438
483
  Examples:
439
484
 
@@ -451,17 +496,17 @@ No other changes yet.
451
496
  </details>
452
497
 
453
498
  ```grain
454
- addCharFromCodePoint : (codePoint: Number, buffer: Buffer) => Void
499
+ addCharFromCodePoint: (codePoint: Number, buffer: Buffer) => Void
455
500
  ```
456
501
 
457
502
  Appends a character represented by a code point to a buffer.
458
503
 
459
504
  Parameters:
460
505
 
461
- |param|type|description|
462
- |-----|----|-----------|
463
- |`codePoint`|`Number`|The code point to append to the buffer|
464
- |`buffer`|`Buffer`|The buffer to mutate|
506
+ | param | type | description |
507
+ | ----------- | -------- | -------------------------------------- |
508
+ | `codePoint` | `Number` | The code point to append to the buffer |
509
+ | `buffer` | `Buffer` | The buffer to mutate |
465
510
 
466
511
  Examples:
467
512
 
@@ -486,7 +531,7 @@ assert Buffer.toString(buf) == "H"
486
531
  </details>
487
532
 
488
533
  ```grain
489
- addStringSlice :
534
+ addStringSlice:
490
535
  (start: Number, end: Number, string: String, buffer: Buffer) => Void
491
536
  ```
492
537
 
@@ -494,12 +539,12 @@ Appends the bytes of a subset of a string to a buffer.
494
539
 
495
540
  Parameters:
496
541
 
497
- |param|type|description|
498
- |-----|----|-----------|
499
- |`start`|`Number`|The char offset into the string|
500
- |`end`|`Number`|The end offset into the string|
501
- |`string`|`String`|The string to append|
502
- |`buffer`|`Buffer`|The buffer to mutate|
542
+ | param | type | description |
543
+ | -------- | -------- | ------------------------------- |
544
+ | `start` | `Number` | The char offset into the string |
545
+ | `end` | `Number` | The end offset into the string |
546
+ | `string` | `String` | The string to append |
547
+ | `buffer` | `Buffer` | The buffer to mutate |
503
548
 
504
549
  Examples:
505
550
 
@@ -517,7 +562,7 @@ No other changes yet.
517
562
  </details>
518
563
 
519
564
  ```grain
520
- addBytesSlice :
565
+ addBytesSlice:
521
566
  (start: Number, length: Number, bytes: Bytes, buffer: Buffer) => Void
522
567
  ```
523
568
 
@@ -525,12 +570,12 @@ Appends the bytes of a subset of a byte sequence to a buffer.
525
570
 
526
571
  Parameters:
527
572
 
528
- |param|type|description|
529
- |-----|----|-----------|
530
- |`start`|`Number`|The byte offset into the byte sequence|
531
- |`length`|`Number`|The number of bytes to append|
532
- |`bytes`|`Bytes`|The byte sequence to append|
533
- |`buffer`|`Buffer`|The buffer to mutate|
573
+ | param | type | description |
574
+ | -------- | -------- | -------------------------------------- |
575
+ | `start` | `Number` | The byte offset into the byte sequence |
576
+ | `length` | `Number` | The number of bytes to append |
577
+ | `bytes` | `Bytes` | The byte sequence to append |
578
+ | `buffer` | `Buffer` | The buffer to mutate |
534
579
 
535
580
  Throws:
536
581
 
@@ -557,7 +602,7 @@ No other changes yet.
557
602
  </details>
558
603
 
559
604
  ```grain
560
- addBuffer : (srcBuffer: Buffer, dstBuffer: Buffer) => Void
605
+ addBuffer: (srcBuffer: Buffer, dstBuffer: Buffer) => Void
561
606
  ```
562
607
 
563
608
  Appends the bytes of a source buffer to destination buffer.
@@ -566,10 +611,10 @@ The source buffer is not mutated by this operation. The destination buffer, howe
566
611
 
567
612
  Parameters:
568
613
 
569
- |param|type|description|
570
- |-----|----|-----------|
571
- |`srcBuffer`|`Buffer`|The buffer to append|
572
- |`dstBuffer`|`Buffer`|The buffer to mutate|
614
+ | param | type | description |
615
+ | ----------- | -------- | -------------------- |
616
+ | `srcBuffer` | `Buffer` | The buffer to append |
617
+ | `dstBuffer` | `Buffer` | The buffer to mutate |
573
618
 
574
619
  Examples:
575
620
 
@@ -590,7 +635,7 @@ No other changes yet.
590
635
  </details>
591
636
 
592
637
  ```grain
593
- addBufferSlice :
638
+ addBufferSlice:
594
639
  (start: Number, length: Number, srcBuffer: Buffer, dstBuffer: Buffer) =>
595
640
  Void
596
641
  ```
@@ -601,12 +646,12 @@ The source buffer is not mutated by this operation. The destination buffer, howe
601
646
 
602
647
  Parameters:
603
648
 
604
- |param|type|description|
605
- |-----|----|-----------|
606
- |`start`|`Number`|The byte offset into the buffer|
607
- |`length`|`Number`|The number of bytes to append|
608
- |`srcBuffer`|`Buffer`|The buffer to append|
609
- |`dstBuffer`|`Buffer`|The buffer to mutate|
649
+ | param | type | description |
650
+ | ----------- | -------- | ------------------------------- |
651
+ | `start` | `Number` | The byte offset into the buffer |
652
+ | `length` | `Number` | The number of bytes to append |
653
+ | `srcBuffer` | `Buffer` | The buffer to append |
654
+ | `dstBuffer` | `Buffer` | The buffer to mutate |
610
655
 
611
656
  Examples:
612
657
 
@@ -634,23 +679,23 @@ assert Buffer.toString(buf1) == "HelloWorld"
634
679
  </details>
635
680
 
636
681
  ```grain
637
- getInt8 : (index: Number, buffer: Buffer) => Int8
682
+ getInt8: (index: Number, buffer: Buffer) => Int8
638
683
  ```
639
684
 
640
685
  Gets a signed 8-bit integer starting at the given byte index.
641
686
 
642
687
  Parameters:
643
688
 
644
- |param|type|description|
645
- |-----|----|-----------|
646
- |`index`|`Number`|The byte index to access|
647
- |`buffer`|`Buffer`|The buffer to access|
689
+ | param | type | description |
690
+ | -------- | -------- | ------------------------ |
691
+ | `index` | `Number` | The byte index to access |
692
+ | `buffer` | `Buffer` | The buffer to access |
648
693
 
649
694
  Returns:
650
695
 
651
- |type|description|
652
- |----|-----------|
653
- |`Int8`|A signed 8-bit integer that starts at the given index|
696
+ | type | description |
697
+ | ------ | ----------------------------------------------------- |
698
+ | `Int8` | A signed 8-bit integer that starts at the given index |
654
699
 
655
700
  Throws:
656
701
 
@@ -670,6 +715,8 @@ assert Buffer.getInt8(0, buf) == 1s
670
715
 
671
716
  ### Buffer.**setInt8**
672
717
 
718
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
719
+
673
720
  <details>
674
721
  <summary>Added in <code>0.4.0</code></summary>
675
722
  <table>
@@ -678,23 +725,24 @@ assert Buffer.getInt8(0, buf) == 1s
678
725
  </thead>
679
726
  <tbody>
680
727
  <tr><td><code>0.6.0</code></td><td>`value` argument type changed to `Int8`</td></tr>
728
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setInt8`</td></tr>
681
729
  </tbody>
682
730
  </table>
683
731
  </details>
684
732
 
685
733
  ```grain
686
- setInt8 : (index: Number, value: Int8, buffer: Buffer) => Void
734
+ setInt8: (index: Number, value: Int8, buffer: Buffer) => Void
687
735
  ```
688
736
 
689
737
  Sets a signed 8-bit integer starting at the given byte index.
690
738
 
691
739
  Parameters:
692
740
 
693
- |param|type|description|
694
- |-----|----|-----------|
695
- |`index`|`Number`|The byte index to update|
696
- |`value`|`Int8`|The value to set|
697
- |`buffer`|`Buffer`|The buffer to mutate|
741
+ | param | type | description |
742
+ | -------- | -------- | ------------------------ |
743
+ | `index` | `Number` | The byte index to update |
744
+ | `value` | `Int8` | The value to set |
745
+ | `buffer` | `Buffer` | The buffer to mutate |
698
746
 
699
747
  Throws:
700
748
 
@@ -728,17 +776,17 @@ assert Buffer.getInt8(0, buf) == 3s
728
776
  </details>
729
777
 
730
778
  ```grain
731
- addInt8 : (value: Int8, buffer: Buffer) => Void
779
+ addInt8: (value: Int8, buffer: Buffer) => Void
732
780
  ```
733
781
 
734
782
  Appends a signed 8-bit integer to a buffer.
735
783
 
736
784
  Parameters:
737
785
 
738
- |param|type|description|
739
- |-----|----|-----------|
740
- |`value`|`Int8`|The value to append|
741
- |`buffer`|`Buffer`|The buffer to mutate|
786
+ | param | type | description |
787
+ | -------- | -------- | -------------------- |
788
+ | `value` | `Int8` | The value to append |
789
+ | `buffer` | `Buffer` | The buffer to mutate |
742
790
 
743
791
  Examples:
744
792
 
@@ -763,23 +811,23 @@ assert Buffer.getInt8(0, buf) == 2s
763
811
  </details>
764
812
 
765
813
  ```grain
766
- getUint8 : (index: Number, buffer: Buffer) => Uint8
814
+ getUint8: (index: Number, buffer: Buffer) => Uint8
767
815
  ```
768
816
 
769
817
  Gets an unsigned 8-bit integer starting at the given byte index.
770
818
 
771
819
  Parameters:
772
820
 
773
- |param|type|description|
774
- |-----|----|-----------|
775
- |`index`|`Number`|The byte index to access|
776
- |`buffer`|`Buffer`|The buffer to access|
821
+ | param | type | description |
822
+ | -------- | -------- | ------------------------ |
823
+ | `index` | `Number` | The byte index to access |
824
+ | `buffer` | `Buffer` | The buffer to access |
777
825
 
778
826
  Returns:
779
827
 
780
- |type|description|
781
- |----|-----------|
782
- |`Uint8`|An unsigned 8-bit integer that starts at the given index|
828
+ | type | description |
829
+ | ------- | -------------------------------------------------------- |
830
+ | `Uint8` | An unsigned 8-bit integer that starts at the given index |
783
831
 
784
832
  Throws:
785
833
 
@@ -799,24 +847,33 @@ assert Buffer.getUint8(0, buf) == 3us
799
847
 
800
848
  ### Buffer.**setUint8**
801
849
 
802
- <details disabled>
803
- <summary tabindex="-1">Added in <code>0.6.0</code></summary>
804
- No other changes yet.
850
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
851
+
852
+ <details>
853
+ <summary>Added in <code>0.6.0</code></summary>
854
+ <table>
855
+ <thead>
856
+ <tr><th>version</th><th>changes</th></tr>
857
+ </thead>
858
+ <tbody>
859
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setUint8`</td></tr>
860
+ </tbody>
861
+ </table>
805
862
  </details>
806
863
 
807
864
  ```grain
808
- setUint8 : (index: Number, value: Uint8, buffer: Buffer) => Void
865
+ setUint8: (index: Number, value: Uint8, buffer: Buffer) => Void
809
866
  ```
810
867
 
811
868
  Sets an unsigned 8-bit integer starting at the given byte index.
812
869
 
813
870
  Parameters:
814
871
 
815
- |param|type|description|
816
- |-----|----|-----------|
817
- |`index`|`Number`|The byte index to update|
818
- |`value`|`Uint8`|The value to set|
819
- |`buffer`|`Buffer`|The buffer to mutate|
872
+ | param | type | description |
873
+ | -------- | -------- | ------------------------ |
874
+ | `index` | `Number` | The byte index to update |
875
+ | `value` | `Uint8` | The value to set |
876
+ | `buffer` | `Buffer` | The buffer to mutate |
820
877
 
821
878
  Throws:
822
879
 
@@ -843,17 +900,17 @@ No other changes yet.
843
900
  </details>
844
901
 
845
902
  ```grain
846
- addUint8 : (value: Uint8, buffer: Buffer) => Void
903
+ addUint8: (value: Uint8, buffer: Buffer) => Void
847
904
  ```
848
905
 
849
906
  Appends an unsigned 8-bit integer to a buffer.
850
907
 
851
908
  Parameters:
852
909
 
853
- |param|type|description|
854
- |-----|----|-----------|
855
- |`value`|`Uint8`|The value to append|
856
- |`buffer`|`Buffer`|The buffer to mutate|
910
+ | param | type | description |
911
+ | -------- | -------- | -------------------- |
912
+ | `value` | `Uint8` | The value to append |
913
+ | `buffer` | `Buffer` | The buffer to mutate |
857
914
 
858
915
  Examples:
859
916
 
@@ -878,23 +935,23 @@ assert Buffer.getUint8(0, buf) == 0us
878
935
  </details>
879
936
 
880
937
  ```grain
881
- getInt16 : (index: Number, buffer: Buffer) => Int16
938
+ getInt16: (index: Number, buffer: Buffer) => Int16
882
939
  ```
883
940
 
884
941
  Gets a signed 16-bit integer starting at the given byte index.
885
942
 
886
943
  Parameters:
887
944
 
888
- |param|type|description|
889
- |-----|----|-----------|
890
- |`index`|`Number`|The byte index to access|
891
- |`buffer`|`Buffer`|The buffer to access|
945
+ | param | type | description |
946
+ | -------- | -------- | ------------------------ |
947
+ | `index` | `Number` | The byte index to access |
948
+ | `buffer` | `Buffer` | The buffer to access |
892
949
 
893
950
  Returns:
894
951
 
895
- |type|description|
896
- |----|-----------|
897
- |`Int16`|A signed 16-bit integer that starts at the given index|
952
+ | type | description |
953
+ | ------- | ------------------------------------------------------ |
954
+ | `Int16` | A signed 16-bit integer that starts at the given index |
898
955
 
899
956
  Throws:
900
957
 
@@ -914,6 +971,8 @@ assert Buffer.getInt16(0, buf) == 1S
914
971
 
915
972
  ### Buffer.**setInt16**
916
973
 
974
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
975
+
917
976
  <details>
918
977
  <summary>Added in <code>0.4.0</code></summary>
919
978
  <table>
@@ -922,23 +981,24 @@ assert Buffer.getInt16(0, buf) == 1S
922
981
  </thead>
923
982
  <tbody>
924
983
  <tr><td><code>0.6.0</code></td><td>`value` argument type changed to `Int16`</td></tr>
984
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setInt16`</td></tr>
925
985
  </tbody>
926
986
  </table>
927
987
  </details>
928
988
 
929
989
  ```grain
930
- setInt16 : (index: Number, value: Int16, buffer: Buffer) => Void
990
+ setInt16: (index: Number, value: Int16, buffer: Buffer) => Void
931
991
  ```
932
992
 
933
993
  Sets a signed 16-bit integer starting at the given byte index.
934
994
 
935
995
  Parameters:
936
996
 
937
- |param|type|description|
938
- |-----|----|-----------|
939
- |`index`|`Number`|The byte index to update|
940
- |`value`|`Int16`|The value to set|
941
- |`buffer`|`Buffer`|The buffer to mutate|
997
+ | param | type | description |
998
+ | -------- | -------- | ------------------------ |
999
+ | `index` | `Number` | The byte index to update |
1000
+ | `value` | `Int16` | The value to set |
1001
+ | `buffer` | `Buffer` | The buffer to mutate |
942
1002
 
943
1003
  Throws:
944
1004
 
@@ -972,17 +1032,17 @@ assert Buffer.getInt16(5, buf) == 1S
972
1032
  </details>
973
1033
 
974
1034
  ```grain
975
- addInt16 : (value: Int16, buffer: Buffer) => Void
1035
+ addInt16: (value: Int16, buffer: Buffer) => Void
976
1036
  ```
977
1037
 
978
1038
  Appends a signed 16-bit integer to a buffer.
979
1039
 
980
1040
  Parameters:
981
1041
 
982
- |param|type|description|
983
- |-----|----|-----------|
984
- |`value`|`Int16`|The value to append|
985
- |`buffer`|`Buffer`|The buffer to mutate|
1042
+ | param | type | description |
1043
+ | -------- | -------- | -------------------- |
1044
+ | `value` | `Int16` | The value to append |
1045
+ | `buffer` | `Buffer` | The buffer to mutate |
986
1046
 
987
1047
  Examples:
988
1048
 
@@ -1007,23 +1067,23 @@ assert Buffer.getInt16(0, buf) == 2S
1007
1067
  </details>
1008
1068
 
1009
1069
  ```grain
1010
- getUint16 : (index: Number, buffer: Buffer) => Uint16
1070
+ getUint16: (index: Number, buffer: Buffer) => Uint16
1011
1071
  ```
1012
1072
 
1013
1073
  Gets an unsigned 16-bit integer starting at the given byte index.
1014
1074
 
1015
1075
  Parameters:
1016
1076
 
1017
- |param|type|description|
1018
- |-----|----|-----------|
1019
- |`index`|`Number`|The byte index to access|
1020
- |`buffer`|`Buffer`|The buffer to access|
1077
+ | param | type | description |
1078
+ | -------- | -------- | ------------------------ |
1079
+ | `index` | `Number` | The byte index to access |
1080
+ | `buffer` | `Buffer` | The buffer to access |
1021
1081
 
1022
1082
  Returns:
1023
1083
 
1024
- |type|description|
1025
- |----|-----------|
1026
- |`Uint16`|An unsigned 16-bit integer that starts at the given index|
1084
+ | type | description |
1085
+ | -------- | --------------------------------------------------------- |
1086
+ | `Uint16` | An unsigned 16-bit integer that starts at the given index |
1027
1087
 
1028
1088
  Throws:
1029
1089
 
@@ -1043,24 +1103,33 @@ assert Buffer.getUint16(0, buf) == 1uS
1043
1103
 
1044
1104
  ### Buffer.**setUint16**
1045
1105
 
1046
- <details disabled>
1047
- <summary tabindex="-1">Added in <code>0.6.0</code></summary>
1048
- No other changes yet.
1106
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
1107
+
1108
+ <details>
1109
+ <summary>Added in <code>0.6.0</code></summary>
1110
+ <table>
1111
+ <thead>
1112
+ <tr><th>version</th><th>changes</th></tr>
1113
+ </thead>
1114
+ <tbody>
1115
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setUint16`</td></tr>
1116
+ </tbody>
1117
+ </table>
1049
1118
  </details>
1050
1119
 
1051
1120
  ```grain
1052
- setUint16 : (index: Number, value: Uint16, buffer: Buffer) => Void
1121
+ setUint16: (index: Number, value: Uint16, buffer: Buffer) => Void
1053
1122
  ```
1054
1123
 
1055
1124
  Sets an unsigned 16-bit integer starting at the given byte index.
1056
1125
 
1057
1126
  Parameters:
1058
1127
 
1059
- |param|type|description|
1060
- |-----|----|-----------|
1061
- |`index`|`Number`|The byte index to update|
1062
- |`value`|`Uint16`|The value to set|
1063
- |`buffer`|`Buffer`|The buffer to mutate|
1128
+ | param | type | description |
1129
+ | -------- | -------- | ------------------------ |
1130
+ | `index` | `Number` | The byte index to update |
1131
+ | `value` | `Uint16` | The value to set |
1132
+ | `buffer` | `Buffer` | The buffer to mutate |
1064
1133
 
1065
1134
  Throws:
1066
1135
 
@@ -1087,17 +1156,17 @@ No other changes yet.
1087
1156
  </details>
1088
1157
 
1089
1158
  ```grain
1090
- addUint16 : (value: Uint16, buffer: Buffer) => Void
1159
+ addUint16: (value: Uint16, buffer: Buffer) => Void
1091
1160
  ```
1092
1161
 
1093
1162
  Appends an unsigned 16-bit integer to a buffer.
1094
1163
 
1095
1164
  Parameters:
1096
1165
 
1097
- |param|type|description|
1098
- |-----|----|-----------|
1099
- |`value`|`Uint16`|The value to append|
1100
- |`buffer`|`Buffer`|The buffer to mutate|
1166
+ | param | type | description |
1167
+ | -------- | -------- | -------------------- |
1168
+ | `value` | `Uint16` | The value to append |
1169
+ | `buffer` | `Buffer` | The buffer to mutate |
1101
1170
 
1102
1171
  Examples:
1103
1172
 
@@ -1115,23 +1184,23 @@ No other changes yet.
1115
1184
  </details>
1116
1185
 
1117
1186
  ```grain
1118
- getInt32 : (index: Number, buffer: Buffer) => Int32
1187
+ getInt32: (index: Number, buffer: Buffer) => Int32
1119
1188
  ```
1120
1189
 
1121
1190
  Gets a signed 32-bit integer starting at the given byte index.
1122
1191
 
1123
1192
  Parameters:
1124
1193
 
1125
- |param|type|description|
1126
- |-----|----|-----------|
1127
- |`index`|`Number`|The byte index to access|
1128
- |`buffer`|`Buffer`|The buffer to access|
1194
+ | param | type | description |
1195
+ | -------- | -------- | ------------------------ |
1196
+ | `index` | `Number` | The byte index to access |
1197
+ | `buffer` | `Buffer` | The buffer to access |
1129
1198
 
1130
1199
  Returns:
1131
1200
 
1132
- |type|description|
1133
- |----|-----------|
1134
- |`Int32`|A signed 32-bit integer that starts at the given index|
1201
+ | type | description |
1202
+ | ------- | ------------------------------------------------------ |
1203
+ | `Int32` | A signed 32-bit integer that starts at the given index |
1135
1204
 
1136
1205
  Throws:
1137
1206
 
@@ -1151,24 +1220,33 @@ assert Buffer.getInt32(0, buf) == 1l
1151
1220
 
1152
1221
  ### Buffer.**setInt32**
1153
1222
 
1154
- <details disabled>
1155
- <summary tabindex="-1">Added in <code>0.4.0</code></summary>
1156
- No other changes yet.
1223
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
1224
+
1225
+ <details>
1226
+ <summary>Added in <code>0.4.0</code></summary>
1227
+ <table>
1228
+ <thead>
1229
+ <tr><th>version</th><th>changes</th></tr>
1230
+ </thead>
1231
+ <tbody>
1232
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setInt32`</td></tr>
1233
+ </tbody>
1234
+ </table>
1157
1235
  </details>
1158
1236
 
1159
1237
  ```grain
1160
- setInt32 : (index: Number, value: Int32, buffer: Buffer) => Void
1238
+ setInt32: (index: Number, value: Int32, buffer: Buffer) => Void
1161
1239
  ```
1162
1240
 
1163
1241
  Sets a signed 32-bit integer starting at the given byte index.
1164
1242
 
1165
1243
  Parameters:
1166
1244
 
1167
- |param|type|description|
1168
- |-----|----|-----------|
1169
- |`index`|`Number`|The byte index to update|
1170
- |`value`|`Int32`|The value to set|
1171
- |`buffer`|`Buffer`|The buffer to mutate|
1245
+ | param | type | description |
1246
+ | -------- | -------- | ------------------------ |
1247
+ | `index` | `Number` | The byte index to update |
1248
+ | `value` | `Int32` | The value to set |
1249
+ | `buffer` | `Buffer` | The buffer to mutate |
1172
1250
 
1173
1251
  Throws:
1174
1252
 
@@ -1195,17 +1273,17 @@ No other changes yet.
1195
1273
  </details>
1196
1274
 
1197
1275
  ```grain
1198
- addInt32 : (value: Int32, buffer: Buffer) => Void
1276
+ addInt32: (value: Int32, buffer: Buffer) => Void
1199
1277
  ```
1200
1278
 
1201
1279
  Appends a signed 32-bit integer to a buffer.
1202
1280
 
1203
1281
  Parameters:
1204
1282
 
1205
- |param|type|description|
1206
- |-----|----|-----------|
1207
- |`value`|`Int32`|The value to append|
1208
- |`buffer`|`Buffer`|The buffer to mutate|
1283
+ | param | type | description |
1284
+ | -------- | -------- | -------------------- |
1285
+ | `value` | `Int32` | The value to append |
1286
+ | `buffer` | `Buffer` | The buffer to mutate |
1209
1287
 
1210
1288
  Examples:
1211
1289
 
@@ -1223,23 +1301,23 @@ No other changes yet.
1223
1301
  </details>
1224
1302
 
1225
1303
  ```grain
1226
- getUint32 : (index: Number, buffer: Buffer) => Uint32
1304
+ getUint32: (index: Number, buffer: Buffer) => Uint32
1227
1305
  ```
1228
1306
 
1229
1307
  Gets an unsigned 32-bit integer starting at the given byte index.
1230
1308
 
1231
1309
  Parameters:
1232
1310
 
1233
- |param|type|description|
1234
- |-----|----|-----------|
1235
- |`index`|`Number`|The byte index to access|
1236
- |`buffer`|`Buffer`|The buffer to access|
1311
+ | param | type | description |
1312
+ | -------- | -------- | ------------------------ |
1313
+ | `index` | `Number` | The byte index to access |
1314
+ | `buffer` | `Buffer` | The buffer to access |
1237
1315
 
1238
1316
  Returns:
1239
1317
 
1240
- |type|description|
1241
- |----|-----------|
1242
- |`Uint32`|An unsigned 32-bit integer that starts at the given index|
1318
+ | type | description |
1319
+ | -------- | --------------------------------------------------------- |
1320
+ | `Uint32` | An unsigned 32-bit integer that starts at the given index |
1243
1321
 
1244
1322
  Throws:
1245
1323
 
@@ -1259,24 +1337,33 @@ assert Buffer.getUint32(0, buf) == 1ul
1259
1337
 
1260
1338
  ### Buffer.**setUint32**
1261
1339
 
1262
- <details disabled>
1263
- <summary tabindex="-1">Added in <code>0.6.0</code></summary>
1264
- No other changes yet.
1340
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
1341
+
1342
+ <details>
1343
+ <summary>Added in <code>0.6.0</code></summary>
1344
+ <table>
1345
+ <thead>
1346
+ <tr><th>version</th><th>changes</th></tr>
1347
+ </thead>
1348
+ <tbody>
1349
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setUint32`</td></tr>
1350
+ </tbody>
1351
+ </table>
1265
1352
  </details>
1266
1353
 
1267
1354
  ```grain
1268
- setUint32 : (index: Number, value: Uint32, buffer: Buffer) => Void
1355
+ setUint32: (index: Number, value: Uint32, buffer: Buffer) => Void
1269
1356
  ```
1270
1357
 
1271
1358
  Sets an unsigned 32-bit integer starting at the given byte index.
1272
1359
 
1273
1360
  Parameters:
1274
1361
 
1275
- |param|type|description|
1276
- |-----|----|-----------|
1277
- |`index`|`Number`|The byte index to update|
1278
- |`value`|`Uint32`|The value to set|
1279
- |`buffer`|`Buffer`|The buffer to mutate|
1362
+ | param | type | description |
1363
+ | -------- | -------- | ------------------------ |
1364
+ | `index` | `Number` | The byte index to update |
1365
+ | `value` | `Uint32` | The value to set |
1366
+ | `buffer` | `Buffer` | The buffer to mutate |
1280
1367
 
1281
1368
  Throws:
1282
1369
 
@@ -1303,17 +1390,17 @@ No other changes yet.
1303
1390
  </details>
1304
1391
 
1305
1392
  ```grain
1306
- addUint32 : (value: Uint32, buffer: Buffer) => Void
1393
+ addUint32: (value: Uint32, buffer: Buffer) => Void
1307
1394
  ```
1308
1395
 
1309
1396
  Appends an unsigned 32-bit integer to a buffer.
1310
1397
 
1311
1398
  Parameters:
1312
1399
 
1313
- |param|type|description|
1314
- |-----|----|-----------|
1315
- |`value`|`Uint32`|The value to append|
1316
- |`buffer`|`Buffer`|The buffer to mutate|
1400
+ | param | type | description |
1401
+ | -------- | -------- | -------------------- |
1402
+ | `value` | `Uint32` | The value to append |
1403
+ | `buffer` | `Buffer` | The buffer to mutate |
1317
1404
 
1318
1405
  Examples:
1319
1406
 
@@ -1331,23 +1418,23 @@ No other changes yet.
1331
1418
  </details>
1332
1419
 
1333
1420
  ```grain
1334
- getFloat32 : (index: Number, buffer: Buffer) => Float32
1421
+ getFloat32: (index: Number, buffer: Buffer) => Float32
1335
1422
  ```
1336
1423
 
1337
1424
  Gets a 32-bit float starting at the given byte index.
1338
1425
 
1339
1426
  Parameters:
1340
1427
 
1341
- |param|type|description|
1342
- |-----|----|-----------|
1343
- |`index`|`Number`|The byte index to access|
1344
- |`buffer`|`Buffer`|The buffer to access|
1428
+ | param | type | description |
1429
+ | -------- | -------- | ------------------------ |
1430
+ | `index` | `Number` | The byte index to access |
1431
+ | `buffer` | `Buffer` | The buffer to access |
1345
1432
 
1346
1433
  Returns:
1347
1434
 
1348
- |type|description|
1349
- |----|-----------|
1350
- |`Float32`|A 32-bit float that starts at the given index|
1435
+ | type | description |
1436
+ | --------- | --------------------------------------------- |
1437
+ | `Float32` | A 32-bit float that starts at the given index |
1351
1438
 
1352
1439
  Throws:
1353
1440
 
@@ -1367,24 +1454,33 @@ assert Buffer.getFloat32(0, buf) == 1.0f
1367
1454
 
1368
1455
  ### Buffer.**setFloat32**
1369
1456
 
1370
- <details disabled>
1371
- <summary tabindex="-1">Added in <code>0.4.0</code></summary>
1372
- No other changes yet.
1457
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
1458
+
1459
+ <details>
1460
+ <summary>Added in <code>0.4.0</code></summary>
1461
+ <table>
1462
+ <thead>
1463
+ <tr><th>version</th><th>changes</th></tr>
1464
+ </thead>
1465
+ <tbody>
1466
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setFloat32`</td></tr>
1467
+ </tbody>
1468
+ </table>
1373
1469
  </details>
1374
1470
 
1375
1471
  ```grain
1376
- setFloat32 : (index: Number, value: Float32, buffer: Buffer) => Void
1472
+ setFloat32: (index: Number, value: Float32, buffer: Buffer) => Void
1377
1473
  ```
1378
1474
 
1379
1475
  Sets a 32-bit float starting at the given byte index.
1380
1476
 
1381
1477
  Parameters:
1382
1478
 
1383
- |param|type|description|
1384
- |-----|----|-----------|
1385
- |`index`|`Number`|The byte index to update|
1386
- |`value`|`Float32`|The value to set|
1387
- |`buffer`|`Buffer`|The buffer to mutate|
1479
+ | param | type | description |
1480
+ | -------- | --------- | ------------------------ |
1481
+ | `index` | `Number` | The byte index to update |
1482
+ | `value` | `Float32` | The value to set |
1483
+ | `buffer` | `Buffer` | The buffer to mutate |
1388
1484
 
1389
1485
  Throws:
1390
1486
 
@@ -1411,17 +1507,17 @@ No other changes yet.
1411
1507
  </details>
1412
1508
 
1413
1509
  ```grain
1414
- addFloat32 : (value: Float32, buffer: Buffer) => Void
1510
+ addFloat32: (value: Float32, buffer: Buffer) => Void
1415
1511
  ```
1416
1512
 
1417
1513
  Appends a 32-bit float to a buffer.
1418
1514
 
1419
1515
  Parameters:
1420
1516
 
1421
- |param|type|description|
1422
- |-----|----|-----------|
1423
- |`value`|`Float32`|The value to append|
1424
- |`buffer`|`Buffer`|The buffer to mutate|
1517
+ | param | type | description |
1518
+ | -------- | --------- | -------------------- |
1519
+ | `value` | `Float32` | The value to append |
1520
+ | `buffer` | `Buffer` | The buffer to mutate |
1425
1521
 
1426
1522
  Examples:
1427
1523
 
@@ -1439,23 +1535,23 @@ No other changes yet.
1439
1535
  </details>
1440
1536
 
1441
1537
  ```grain
1442
- getInt64 : (index: Number, buffer: Buffer) => Int64
1538
+ getInt64: (index: Number, buffer: Buffer) => Int64
1443
1539
  ```
1444
1540
 
1445
1541
  Gets a signed 64-bit integer starting at the given byte index.
1446
1542
 
1447
1543
  Parameters:
1448
1544
 
1449
- |param|type|description|
1450
- |-----|----|-----------|
1451
- |`index`|`Number`|The byte index to access|
1452
- |`buffer`|`Buffer`|The buffer to access|
1545
+ | param | type | description |
1546
+ | -------- | -------- | ------------------------ |
1547
+ | `index` | `Number` | The byte index to access |
1548
+ | `buffer` | `Buffer` | The buffer to access |
1453
1549
 
1454
1550
  Returns:
1455
1551
 
1456
- |type|description|
1457
- |----|-----------|
1458
- |`Int64`|A signed 64-bit integer that starts at the given index|
1552
+ | type | description |
1553
+ | ------- | ------------------------------------------------------ |
1554
+ | `Int64` | A signed 64-bit integer that starts at the given index |
1459
1555
 
1460
1556
  Throws:
1461
1557
 
@@ -1475,24 +1571,33 @@ assert Buffer.getInt64(0, buf) == 1L
1475
1571
 
1476
1572
  ### Buffer.**setInt64**
1477
1573
 
1478
- <details disabled>
1479
- <summary tabindex="-1">Added in <code>0.4.0</code></summary>
1480
- No other changes yet.
1574
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
1575
+
1576
+ <details>
1577
+ <summary>Added in <code>0.4.0</code></summary>
1578
+ <table>
1579
+ <thead>
1580
+ <tr><th>version</th><th>changes</th></tr>
1581
+ </thead>
1582
+ <tbody>
1583
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setInt64</td></tr>
1584
+ </tbody>
1585
+ </table>
1481
1586
  </details>
1482
1587
 
1483
1588
  ```grain
1484
- setInt64 : (index: Number, value: Int64, buffer: Buffer) => Void
1589
+ setInt64: (index: Number, value: Int64, buffer: Buffer) => Void
1485
1590
  ```
1486
1591
 
1487
1592
  Sets a signed 64-bit integer starting at the given byte index.
1488
1593
 
1489
1594
  Parameters:
1490
1595
 
1491
- |param|type|description|
1492
- |-----|----|-----------|
1493
- |`index`|`Number`|The byte index to update|
1494
- |`value`|`Int64`|The value to set|
1495
- |`buffer`|`Buffer`|The buffer to mutate|
1596
+ | param | type | description |
1597
+ | -------- | -------- | ------------------------ |
1598
+ | `index` | `Number` | The byte index to update |
1599
+ | `value` | `Int64` | The value to set |
1600
+ | `buffer` | `Buffer` | The buffer to mutate |
1496
1601
 
1497
1602
  Throws:
1498
1603
 
@@ -1519,17 +1624,17 @@ No other changes yet.
1519
1624
  </details>
1520
1625
 
1521
1626
  ```grain
1522
- addInt64 : (value: Int64, buffer: Buffer) => Void
1627
+ addInt64: (value: Int64, buffer: Buffer) => Void
1523
1628
  ```
1524
1629
 
1525
1630
  Appends a signed 64-bit integer to a buffer.
1526
1631
 
1527
1632
  Parameters:
1528
1633
 
1529
- |param|type|description|
1530
- |-----|----|-----------|
1531
- |`value`|`Int64`|The value to set|
1532
- |`buffer`|`Buffer`|The buffer to mutate|
1634
+ | param | type | description |
1635
+ | -------- | -------- | -------------------- |
1636
+ | `value` | `Int64` | The value to set |
1637
+ | `buffer` | `Buffer` | The buffer to mutate |
1533
1638
 
1534
1639
  Examples:
1535
1640
 
@@ -1547,23 +1652,23 @@ No other changes yet.
1547
1652
  </details>
1548
1653
 
1549
1654
  ```grain
1550
- getUint64 : (index: Number, buffer: Buffer) => Uint64
1655
+ getUint64: (index: Number, buffer: Buffer) => Uint64
1551
1656
  ```
1552
1657
 
1553
1658
  Gets an unsigned 64-bit integer starting at the given byte index.
1554
1659
 
1555
1660
  Parameters:
1556
1661
 
1557
- |param|type|description|
1558
- |-----|----|-----------|
1559
- |`index`|`Number`|The byte index to access|
1560
- |`buffer`|`Buffer`|The buffer to access|
1662
+ | param | type | description |
1663
+ | -------- | -------- | ------------------------ |
1664
+ | `index` | `Number` | The byte index to access |
1665
+ | `buffer` | `Buffer` | The buffer to access |
1561
1666
 
1562
1667
  Returns:
1563
1668
 
1564
- |type|description|
1565
- |----|-----------|
1566
- |`Uint64`|An unsigned 64-bit integer that starts at the given index|
1669
+ | type | description |
1670
+ | -------- | --------------------------------------------------------- |
1671
+ | `Uint64` | An unsigned 64-bit integer that starts at the given index |
1567
1672
 
1568
1673
  Throws:
1569
1674
 
@@ -1583,24 +1688,33 @@ assert Buffer.getUint64(0, buf) == 1uL
1583
1688
 
1584
1689
  ### Buffer.**setUint64**
1585
1690
 
1586
- <details disabled>
1587
- <summary tabindex="-1">Added in <code>0.6.0</code></summary>
1588
- No other changes yet.
1691
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
1692
+
1693
+ <details>
1694
+ <summary>Added in <code>0.6.0</code></summary>
1695
+ <table>
1696
+ <thead>
1697
+ <tr><th>version</th><th>changes</th></tr>
1698
+ </thead>
1699
+ <tbody>
1700
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setUint64`</td></tr>
1701
+ </tbody>
1702
+ </table>
1589
1703
  </details>
1590
1704
 
1591
1705
  ```grain
1592
- setUint64 : (index: Number, value: Uint64, buffer: Buffer) => Void
1706
+ setUint64: (index: Number, value: Uint64, buffer: Buffer) => Void
1593
1707
  ```
1594
1708
 
1595
1709
  Sets an unsigned 64-bit integer starting at the given byte index.
1596
1710
 
1597
1711
  Parameters:
1598
1712
 
1599
- |param|type|description|
1600
- |-----|----|-----------|
1601
- |`index`|`Number`|The byte index to update|
1602
- |`value`|`Uint64`|The value to set|
1603
- |`buffer`|`Buffer`|The buffer to mutate|
1713
+ | param | type | description |
1714
+ | -------- | -------- | ------------------------ |
1715
+ | `index` | `Number` | The byte index to update |
1716
+ | `value` | `Uint64` | The value to set |
1717
+ | `buffer` | `Buffer` | The buffer to mutate |
1604
1718
 
1605
1719
  Throws:
1606
1720
 
@@ -1627,17 +1741,17 @@ No other changes yet.
1627
1741
  </details>
1628
1742
 
1629
1743
  ```grain
1630
- addUint64 : (value: Uint64, buffer: Buffer) => Void
1744
+ addUint64: (value: Uint64, buffer: Buffer) => Void
1631
1745
  ```
1632
1746
 
1633
1747
  Appends an unsigned 64-bit integer to a buffer.
1634
1748
 
1635
1749
  Parameters:
1636
1750
 
1637
- |param|type|description|
1638
- |-----|----|-----------|
1639
- |`value`|`Uint64`|The value to set|
1640
- |`buffer`|`Buffer`|The buffer to mutate|
1751
+ | param | type | description |
1752
+ | -------- | -------- | -------------------- |
1753
+ | `value` | `Uint64` | The value to set |
1754
+ | `buffer` | `Buffer` | The buffer to mutate |
1641
1755
 
1642
1756
  Examples:
1643
1757
 
@@ -1655,23 +1769,23 @@ No other changes yet.
1655
1769
  </details>
1656
1770
 
1657
1771
  ```grain
1658
- getFloat64 : (index: Number, buffer: Buffer) => Float64
1772
+ getFloat64: (index: Number, buffer: Buffer) => Float64
1659
1773
  ```
1660
1774
 
1661
1775
  Gets a 64-bit float starting at the given byte index.
1662
1776
 
1663
1777
  Parameters:
1664
1778
 
1665
- |param|type|description|
1666
- |-----|----|-----------|
1667
- |`index`|`Number`|The byte index to access|
1668
- |`buffer`|`Buffer`|The buffer to access|
1779
+ | param | type | description |
1780
+ | -------- | -------- | ------------------------ |
1781
+ | `index` | `Number` | The byte index to access |
1782
+ | `buffer` | `Buffer` | The buffer to access |
1669
1783
 
1670
1784
  Returns:
1671
1785
 
1672
- |type|description|
1673
- |----|-----------|
1674
- |`Float64`|A 64-bit float that starts at the given index|
1786
+ | type | description |
1787
+ | --------- | --------------------------------------------- |
1788
+ | `Float64` | A 64-bit float that starts at the given index |
1675
1789
 
1676
1790
  Throws:
1677
1791
 
@@ -1691,24 +1805,33 @@ assert Buffer.getFloat64(0, buf) == 1.0F
1691
1805
 
1692
1806
  ### Buffer.**setFloat64**
1693
1807
 
1694
- <details disabled>
1695
- <summary tabindex="-1">Added in <code>0.4.0</code></summary>
1696
- No other changes yet.
1808
+ > **Deprecated:** Use `Bytes` instead of `Buffer` for set operations.
1809
+
1810
+ <details>
1811
+ <summary>Added in <code>0.4.0</code></summary>
1812
+ <table>
1813
+ <thead>
1814
+ <tr><th>version</th><th>changes</th></tr>
1815
+ </thead>
1816
+ <tbody>
1817
+ <tr><td><code>0.7.1</code></td><td>Deprecated in favor of `Bytes.setFloat64`</td></tr>
1818
+ </tbody>
1819
+ </table>
1697
1820
  </details>
1698
1821
 
1699
1822
  ```grain
1700
- setFloat64 : (index: Number, value: Float64, buffer: Buffer) => Void
1823
+ setFloat64: (index: Number, value: Float64, buffer: Buffer) => Void
1701
1824
  ```
1702
1825
 
1703
1826
  Sets a 64-bit float starting at the given byte index.
1704
1827
 
1705
1828
  Parameters:
1706
1829
 
1707
- |param|type|description|
1708
- |-----|----|-----------|
1709
- |`index`|`Number`|The byte index to update|
1710
- |`value`|`Float64`|The value to set|
1711
- |`buffer`|`Buffer`|The buffer to mutate|
1830
+ | param | type | description |
1831
+ | -------- | --------- | ------------------------ |
1832
+ | `index` | `Number` | The byte index to update |
1833
+ | `value` | `Float64` | The value to set |
1834
+ | `buffer` | `Buffer` | The buffer to mutate |
1712
1835
 
1713
1836
  Throws:
1714
1837
 
@@ -1735,17 +1858,17 @@ No other changes yet.
1735
1858
  </details>
1736
1859
 
1737
1860
  ```grain
1738
- addFloat64 : (value: Float64, buffer: Buffer) => Void
1861
+ addFloat64: (value: Float64, buffer: Buffer) => Void
1739
1862
  ```
1740
1863
 
1741
1864
  Appends a 64-bit float to a buffer.
1742
1865
 
1743
1866
  Parameters:
1744
1867
 
1745
- |param|type|description|
1746
- |-----|----|-----------|
1747
- |`value`|`Float64`|The value to append|
1748
- |`buffer`|`Buffer`|The buffer to mutate|
1868
+ | param | type | description |
1869
+ | -------- | --------- | -------------------- |
1870
+ | `value` | `Float64` | The value to append |
1871
+ | `buffer` | `Buffer` | The buffer to mutate |
1749
1872
 
1750
1873
  Examples:
1751
1874