Skip to content

Commit 2b1f9d1

Browse files
Feature/1 missing read bytes method (#2)
* Added interface for the new reader method `readBytes` and failing tests * Added implementation for `BinaryReader`'s `readBytes` * Added documentation for `BinaryReader.readBytes` * Rebuilt docs * Updated version number
1 parent 9753529 commit 2b1f9d1

File tree

9 files changed

+175
-54
lines changed

9 files changed

+175
-54
lines changed

docs/assets/js/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/classes/binaryreader.html

Lines changed: 69 additions & 22 deletions
Large diffs are not rendered by default.

docs/classes/binarywriter.html

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ <h3>constructor</h3>
139139
<li class="tsd-description">
140140
<aside class="tsd-sources">
141141
<ul>
142-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L67">BinaryWriter.ts:67</a></li>
142+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L67">BinaryWriter.ts:67</a></li>
143143
</ul>
144144
</aside>
145145
<div class="tsd-comment tsd-typography">
@@ -152,7 +152,7 @@ <h4 class="tsd-returns-title">Returns <a href="binarywriter.html" class="tsd-sig
152152
<li class="tsd-description">
153153
<aside class="tsd-sources">
154154
<ul>
155-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L72">BinaryWriter.ts:72</a></li>
155+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L72">BinaryWriter.ts:72</a></li>
156156
</ul>
157157
</aside>
158158
<div class="tsd-comment tsd-typography">
@@ -180,7 +180,7 @@ <h4 class="tsd-returns-title">Returns <a href="binarywriter.html" class="tsd-sig
180180
<li class="tsd-description">
181181
<aside class="tsd-sources">
182182
<ul>
183-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L84">BinaryWriter.ts:84</a></li>
183+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L84">BinaryWriter.ts:84</a></li>
184184
</ul>
185185
</aside>
186186
<div class="tsd-comment tsd-typography">
@@ -217,7 +217,7 @@ <h3>length</h3>
217217
<li class="tsd-description">
218218
<aside class="tsd-sources">
219219
<ul>
220-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L47">BinaryWriter.ts:47</a></li>
220+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L47">BinaryWriter.ts:47</a></li>
221221
</ul>
222222
</aside>
223223
<div class="tsd-comment tsd-typography">
@@ -240,7 +240,7 @@ <h3>position</h3>
240240
<li class="tsd-description">
241241
<aside class="tsd-sources">
242242
<ul>
243-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L55">BinaryWriter.ts:55</a></li>
243+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L55">BinaryWriter.ts:55</a></li>
244244
</ul>
245245
</aside>
246246
<div class="tsd-comment tsd-typography">
@@ -253,7 +253,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</s
253253
<li class="tsd-description">
254254
<aside class="tsd-sources">
255255
<ul>
256-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L64">BinaryWriter.ts:64</a></li>
256+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L64">BinaryWriter.ts:64</a></li>
257257
</ul>
258258
</aside>
259259
<div class="tsd-comment tsd-typography">
@@ -285,7 +285,7 @@ <h3>clear</h3>
285285
<li class="tsd-description">
286286
<aside class="tsd-sources">
287287
<ul>
288-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L497">BinaryWriter.ts:497</a></li>
288+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L497">BinaryWriter.ts:497</a></li>
289289
</ul>
290290
</aside>
291291
<div class="tsd-comment tsd-typography">
@@ -307,7 +307,7 @@ <h3>to<wbr>Array</h3>
307307
<li class="tsd-description">
308308
<aside class="tsd-sources">
309309
<ul>
310-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L507">BinaryWriter.ts:507</a></li>
310+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L507">BinaryWriter.ts:507</a></li>
311311
</ul>
312312
</aside>
313313
<div class="tsd-comment tsd-typography">
@@ -329,7 +329,7 @@ <h3>to<wbr>Uint8<wbr>Array</h3>
329329
<li class="tsd-description">
330330
<aside class="tsd-sources">
331331
<ul>
332-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L516">BinaryWriter.ts:516</a></li>
332+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L516">BinaryWriter.ts:516</a></li>
333333
</ul>
334334
</aside>
335335
<div class="tsd-comment tsd-typography">
@@ -351,7 +351,7 @@ <h3>write<wbr>Boolean</h3>
351351
<li class="tsd-description">
352352
<aside class="tsd-sources">
353353
<ul>
354-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L120">BinaryWriter.ts:120</a></li>
354+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L120">BinaryWriter.ts:120</a></li>
355355
</ul>
356356
</aside>
357357
<div class="tsd-comment tsd-typography">
@@ -387,7 +387,7 @@ <h3>write<wbr>Byte</h3>
387387
<li class="tsd-description">
388388
<aside class="tsd-sources">
389389
<ul>
390-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L133">BinaryWriter.ts:133</a></li>
390+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L133">BinaryWriter.ts:133</a></li>
391391
</ul>
392392
</aside>
393393
<div class="tsd-comment tsd-typography">
@@ -426,7 +426,7 @@ <h3>write<wbr>Bytes</h3>
426426
<li class="tsd-description">
427427
<aside class="tsd-sources">
428428
<ul>
429-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L169">BinaryWriter.ts:169</a></li>
429+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L169">BinaryWriter.ts:169</a></li>
430430
</ul>
431431
</aside>
432432
<div class="tsd-comment tsd-typography">
@@ -465,7 +465,7 @@ <h3>write<wbr>Char</h3>
465465
<li class="tsd-description">
466466
<aside class="tsd-sources">
467467
<ul>
468-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L419">BinaryWriter.ts:419</a></li>
468+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L419">BinaryWriter.ts:419</a></li>
469469
</ul>
470470
</aside>
471471
<div class="tsd-comment tsd-typography">
@@ -513,7 +513,7 @@ <h3>write<wbr>Chars</h3>
513513
<li class="tsd-description">
514514
<aside class="tsd-sources">
515515
<ul>
516-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L443">BinaryWriter.ts:443</a></li>
516+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L443">BinaryWriter.ts:443</a></li>
517517
</ul>
518518
</aside>
519519
<div class="tsd-comment tsd-typography">
@@ -561,7 +561,7 @@ <h3>write<wbr>Double</h3>
561561
<li class="tsd-description">
562562
<aside class="tsd-sources">
563563
<ul>
564-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L382">BinaryWriter.ts:382</a></li>
564+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L382">BinaryWriter.ts:382</a></li>
565565
</ul>
566566
</aside>
567567
<div class="tsd-comment tsd-typography">
@@ -597,7 +597,7 @@ <h3>write<wbr>Float</h3>
597597
<li class="tsd-description">
598598
<aside class="tsd-sources">
599599
<ul>
600-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L352">BinaryWriter.ts:352</a></li>
600+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L352">BinaryWriter.ts:352</a></li>
601601
</ul>
602602
</aside>
603603
<div class="tsd-comment tsd-typography">
@@ -636,7 +636,7 @@ <h3>write<wbr>Int</h3>
636636
<li class="tsd-description">
637637
<aside class="tsd-sources">
638638
<ul>
639-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L234">BinaryWriter.ts:234</a></li>
639+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L234">BinaryWriter.ts:234</a></li>
640640
</ul>
641641
</aside>
642642
<div class="tsd-comment tsd-typography">
@@ -675,7 +675,7 @@ <h3>write<wbr>Long</h3>
675675
<li class="tsd-description">
676676
<aside class="tsd-sources">
677677
<ul>
678-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L281">BinaryWriter.ts:281</a></li>
678+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L281">BinaryWriter.ts:281</a></li>
679679
</ul>
680680
</aside>
681681
<div class="tsd-comment tsd-typography">
@@ -725,7 +725,7 @@ <h3>write<wbr>Same<wbr>Byte</h3>
725725
<li class="tsd-description">
726726
<aside class="tsd-sources">
727727
<ul>
728-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L149">BinaryWriter.ts:149</a></li>
728+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L149">BinaryWriter.ts:149</a></li>
729729
</ul>
730730
</aside>
731731
<div class="tsd-comment tsd-typography">
@@ -770,7 +770,7 @@ <h3>write<wbr>Short</h3>
770770
<li class="tsd-description">
771771
<aside class="tsd-sources">
772772
<ul>
773-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L202">BinaryWriter.ts:202</a></li>
773+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L202">BinaryWriter.ts:202</a></li>
774774
</ul>
775775
</aside>
776776
<div class="tsd-comment tsd-typography">
@@ -809,7 +809,7 @@ <h3>write<wbr>Signed<wbr>Byte</h3>
809809
<li class="tsd-description">
810810
<aside class="tsd-sources">
811811
<ul>
812-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L187">BinaryWriter.ts:187</a></li>
812+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L187">BinaryWriter.ts:187</a></li>
813813
</ul>
814814
</aside>
815815
<div class="tsd-comment tsd-typography">
@@ -848,7 +848,7 @@ <h3>write<wbr>String</h3>
848848
<li class="tsd-description">
849849
<aside class="tsd-sources">
850850
<ul>
851-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L467">BinaryWriter.ts:467</a></li>
851+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L467">BinaryWriter.ts:467</a></li>
852852
</ul>
853853
</aside>
854854
<div class="tsd-comment tsd-typography">
@@ -896,7 +896,7 @@ <h3>write<wbr>Unsigned<wbr>Int</h3>
896896
<li class="tsd-description">
897897
<aside class="tsd-sources">
898898
<ul>
899-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L252">BinaryWriter.ts:252</a></li>
899+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L252">BinaryWriter.ts:252</a></li>
900900
</ul>
901901
</aside>
902902
<div class="tsd-comment tsd-typography">
@@ -935,7 +935,7 @@ <h3>write<wbr>Unsigned<wbr>Long</h3>
935935
<li class="tsd-description">
936936
<aside class="tsd-sources">
937937
<ul>
938-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L318">BinaryWriter.ts:318</a></li>
938+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L318">BinaryWriter.ts:318</a></li>
939939
</ul>
940940
</aside>
941941
<div class="tsd-comment tsd-typography">
@@ -978,7 +978,7 @@ <h3>write<wbr>Unsigned<wbr>Short</h3>
978978
<li class="tsd-description">
979979
<aside class="tsd-sources">
980980
<ul>
981-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/BinaryWriter.ts#L218">BinaryWriter.ts:218</a></li>
981+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/BinaryWriter.ts#L218">BinaryWriter.ts:218</a></li>
982982
</ul>
983983
</aside>
984984
<div class="tsd-comment tsd-typography">

docs/classes/invalidargumenterror.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ <h3>constructor</h3>
113113
<li class="tsd-description">
114114
<aside class="tsd-sources">
115115
<ul>
116-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/errors/InvalidArgumentError.ts#L4">errors/InvalidArgumentError.ts:4</a></li>
116+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/errors/InvalidArgumentError.ts#L4">errors/InvalidArgumentError.ts:4</a></li>
117117
</ul>
118118
</aside>
119119
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -141,7 +141,7 @@ <h3>argument<wbr>Name</h3>
141141
<div class="tsd-signature tsd-kind-icon">argument<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
142142
<aside class="tsd-sources">
143143
<ul>
144-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/errors/InvalidArgumentError.ts#L3">errors/InvalidArgumentError.ts:3</a></li>
144+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/errors/InvalidArgumentError.ts#L3">errors/InvalidArgumentError.ts:3</a></li>
145145
</ul>
146146
</aside>
147147
</section>
@@ -151,7 +151,7 @@ <h3>argument<wbr>Value</h3>
151151
<div class="tsd-signature tsd-kind-icon">argument<wbr>Value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span></div>
152152
<aside class="tsd-sources">
153153
<ul>
154-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/errors/InvalidArgumentError.ts#L4">errors/InvalidArgumentError.ts:4</a></li>
154+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/errors/InvalidArgumentError.ts#L4">errors/InvalidArgumentError.ts:4</a></li>
155155
</ul>
156156
</aside>
157157
</section>

docs/enums/encoding.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ <h3>Utf8</h3>
8585
<div class="tsd-signature tsd-kind-icon">Utf8<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> =&nbsp;&quot;utf8&quot;</span></div>
8686
<aside class="tsd-sources">
8787
<ul>
88-
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/35a6c99/src/Encoding.ts#L3">Encoding.ts:3</a></li>
88+
<li>Defined in <a href="https://github.com/EvidentlyCube/csharp-binary-stream/blob/1b54935/src/Encoding.ts#L3">Encoding.ts:3</a></li>
8989
</ul>
9090
</aside>
9191
</section>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "csharp-binary-stream",
3-
"version": "1.0.0",
3+
"version": "1.0.01",
44
"description": "Library compatible with C#'s BinaryReader class",
55
"main": "dist/index.js",
66
"files": [

src/BinaryReader.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,30 @@ export class BinaryReader
140140
return byte;
141141
}
142142

143+
/**
144+
* Reads a specified number of `byte`s (unsigned 8-bit number) from the stream and advances the stream by the requested number of bytes.
145+
*
146+
* @param {number} bytesToRead The number of bytes to read from the stream. must be an integer larger or equal than zero.
147+
* @returns {number[]} Array of bytes (numbers between 0 and 255) read from the stream. If `bytesToRead` is `0` it returns an empty array.
148+
* @throws [[InvalidArgumentError]] when `bytesToRead` is less than zero.
149+
* @throws [[EndOfStreamError]] Thrown when there are no bytes left in the stream.
150+
* @link [C# `BinaryReader.ReadBytes` documentation](https://docs.microsoft.com/en-us/dotnet/api/system.io.binaryreader.readbytes?view=netframework-4.7.2)
151+
*/
152+
public readBytes(bytesToRead: number): number[]
153+
{
154+
if (bytesToRead < 0) {
155+
throw new InvalidArgumentError('Cannot read less than 0 bytes', 'bytesToRead', bytesToRead);
156+
}
157+
158+
this.assertRemainingBytes(bytesToRead, 'readBytes');
159+
160+
const result = [];
161+
for(let i = 0; i < bytesToRead; i++) {
162+
result[i] = this._view[this._position++];
163+
}
164+
return result;
165+
}
166+
143167
/**
144168
* Reads a `signed byte` (signed 8-bit number) from the stream and advances the stream by one byte.
145169
*

test/BinaryReader.misc.numbers.test.ts

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {expect} from 'chai';
22
import {BinaryReader} from "../src";
3-
import {getBufferOfLength} from "./common";
3+
import {getBufferArray, getBufferOfLength} from "./common";
44

55
describe("BinaryReader, number misc tests", () =>
66
{
@@ -18,6 +18,24 @@ describe("BinaryReader, number misc tests", () =>
1818
reader.readByte();
1919
expect(reader.position).to.equal(1);
2020
});
21+
it("readBytes(0) - advance by 0 bytes", () =>
22+
{
23+
const reader = new BinaryReader(getBufferOfLength(16));
24+
reader.readBytes(0);
25+
expect(reader.position).to.equal(0);
26+
});
27+
it("readBytes(1) - advance by 1 byte", () =>
28+
{
29+
const reader = new BinaryReader(getBufferOfLength(16));
30+
reader.readBytes(1);
31+
expect(reader.position).to.equal(1);
32+
});
33+
it("readBytes(7) - advance by 7 bytes", () =>
34+
{
35+
const reader = new BinaryReader(getBufferOfLength(16));
36+
reader.readBytes(7);
37+
expect(reader.position).to.equal(7);
38+
});
2139
it("readSignedByte - advance by 2 bytes", () =>
2240
{
2341
const reader = new BinaryReader(getBufferOfLength(16));
@@ -85,4 +103,15 @@ describe("BinaryReader, number misc tests", () =>
85103
expect(reader.position).to.equal(8);
86104
});
87105
});
106+
107+
describe('Correct return', () => {
108+
const bytes = [0, 17, 42, 128, 255];
109+
[0, 1, 2, 3, 4, 5].forEach(bytesToRead => {
110+
it(`readBytes(${bytesToRead}) - should correctly read the bytes`, () => {
111+
const reader = new BinaryReader(getBufferArray(bytes));
112+
const readBytes = reader.readBytes(bytesToRead);
113+
expect(readBytes).to.deep.equal(bytes.slice(0, bytesToRead));
114+
});
115+
})
116+
})
88117
});

0 commit comments

Comments
 (0)