Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d523269
fix(BufferStream) Made option optional which looks like it is the exp…
luissantosHCIT Mar 10, 2026
f613334
feat(vr-tests) began building test harness for key VR behavior prior …
luissantosHCIT Mar 10, 2026
22dec2f
feat(vr-refactor) documented write and refactored its logic to explic…
luissantosHCIT Mar 10, 2026
589b8b7
fix(vr-refactor) correct tracking of bytes written by the write method.
luissantosHCIT Mar 11, 2026
03750d7
feat(vr-tests) updated tests to reflect proper writing of value with …
luissantosHCIT Mar 11, 2026
f8d3e4e
feat(vr-tests) fixed writeBytes test to accomodate strings and values…
luissantosHCIT Mar 11, 2026
7d8d407
feat(vr-refactor) Added documentation strings to make it clear the pu…
luissantosHCIT Mar 11, 2026
8885bb5
feat(vr-refactor) created padding byte lookup table to make it simple…
luissantosHCIT Mar 11, 2026
4f90653
feat(vr-refactor) refactored write and writeBytes to simplify the log…
luissantosHCIT Mar 11, 2026
61c1716
feat(vr-refactor) refactored usage of stream read string methods to u…
luissantosHCIT Mar 11, 2026
f1cac6a
feat(vr-tests) updated tests to reflect the difference of output from…
luissantosHCIT Mar 11, 2026
6ccdd54
feat(vr-refactor) fixing minor defect in how length is handled based …
luissantosHCIT Mar 11, 2026
6b3b6b9
feat(vr-tests) updated test to account for LongString VR type.
luissantosHCIT Mar 11, 2026
2cf1fc3
feat(vr-tests) updated test to account for SignedInteger VR type.
luissantosHCIT Mar 11, 2026
4783274
feat(vr-refactor) making sue we pass a single value as length to the …
luissantosHCIT Mar 11, 2026
6a8393f
feat(vr-refactor) refactored write again to make sure only one length…
luissantosHCIT Mar 11, 2026
88ff1da
feat(vr-refactor) changed this.endOffset check to this.size since cal…
luissantosHCIT Mar 11, 2026
c15fb8d
feat(vr-refactor) making sure the max length of a binary buffer is pa…
luissantosHCIT Mar 11, 2026
e9f3146
feat(vr-tests) Added binary OB vr test to make sure we test binary ty…
luissantosHCIT Mar 11, 2026
2fd4132
feat(vr-refactors) improved logic for determining what the max buffer…
luissantosHCIT Mar 11, 2026
c4ed8fd
feat(vr-refactors) Made sure that the _storeRaw acts as returnRaw for…
luissantosHCIT Mar 11, 2026
dbabdb5
feat(vr-tests) updated the tests in data-tests to reflect the correct…
luissantosHCIT Mar 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/BufferStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class BufferStream {
constructor(options = null) {
this.isLittleEndian = options?.littleEndian || this.isLittleEndian;
this.view.defaultSize = options?.defaultSize ?? this.view.defaultSize;
this.clearBuffers = options.clearBuffers || false;
this.clearBuffers = options?.clearBuffers || false;
}

/**
Expand Down Expand Up @@ -210,7 +210,7 @@ export class BufferStream {
}

readUint8Array(length) {
if (this.offset + length > this.endOffset) {
if (this.offset + length > this.size) {
throw new Error(
`Stream has insufficient data: requested ${length} bytes at offset ${
this.offset
Expand Down
Loading