@helios-lang/codec-utils
Advanced tools
Comparing version 0.1.7 to 0.1.8
{ | ||
"name": "@helios-lang/codec-utils", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "Primitive manipulation functions commonly used in encoding and decoding algorithms", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -13,2 +13,6 @@ export class ByteStream { | ||
constructor(bytes: number[] | Uint8Array, pos?: number); | ||
/** | ||
* Copy ByteStream so mutations doesn't change original ByteStream | ||
* @returns {ByteStream} | ||
*/ | ||
copy(): ByteStream; | ||
@@ -15,0 +19,0 @@ /** |
@@ -39,5 +39,10 @@ export class ByteStream { | ||
/** | ||
* Copy ByteStream so mutations doesn't change original ByteStream | ||
* @returns {ByteStream} | ||
*/ | ||
copy() { | ||
return new ByteStream(this.#bytes) | ||
return new ByteStream(this.#bytes, this.#pos) | ||
} | ||
/** | ||
@@ -44,0 +49,0 @@ * @returns {boolean} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37456
1077