REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.85 KB
Close
/home/byroehnu/.trash/node_modules11/restructure/src/DecodeStream.js
Text
Base64
// Node back-compat. const ENCODING_MAPPING = { utf16le: 'utf-16le', ucs2: 'utf-16le', utf16be: 'utf-16be' } export class DecodeStream { constructor(buffer) { this.buffer = buffer; this.view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength); this.pos = 0; this.length = this.buffer.length; } readString(length, encoding = 'ascii') { encoding = ENCODING_MAPPING[encoding] || encoding; let buf = this.readBuffer(length); try { let decoder = new TextDecoder(encoding); return decoder.decode(buf); } catch (err) { return buf; } } readBuffer(length) { return this.buffer.slice(this.pos, (this.pos += length)); } readUInt24BE() { return (this.readUInt16BE() << 8) + this.readUInt8(); } readUInt24LE() { return this.readUInt16LE() + (this.readUInt8() << 16); } readInt24BE() { return (this.readInt16BE() << 8) + this.readUInt8(); } readInt24LE() { return this.readUInt16LE() + (this.readInt8() << 16); } } DecodeStream.TYPES = { UInt8: 1, UInt16: 2, UInt24: 3, UInt32: 4, Int8: 1, Int16: 2, Int24: 3, Int32: 4, Float: 4, Double: 8 }; for (let key of Object.getOwnPropertyNames(DataView.prototype)) { if (key.slice(0, 3) === 'get') { let type = key.slice(3).replace('Ui', 'UI'); if (type === 'Float32') { type = 'Float'; } else if (type === 'Float64') { type = 'Double'; } let bytes = DecodeStream.TYPES[type]; DecodeStream.prototype['read' + type + (bytes === 1 ? '' : 'BE')] = function () { const ret = this.view[key](this.pos, false); this.pos += bytes; return ret; }; if (bytes !== 1) { DecodeStream.prototype['read' + type + 'LE'] = function () { const ret = this.view[key](this.pos, true); this.pos += bytes; return ret; }; } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 17
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Array.js
2.43 KB
lrw-r--r--
2026-02-14 19:19:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Base.js
412 B
lrw-r--r--
2026-02-14 19:19:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Bitfield.js
741 B
lrw-r--r--
2026-02-14 19:19:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Boolean.js
398 B
lrw-r--r--
2026-02-14 19:19:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Buffer.js
795 B
lrw-r--r--
2026-02-14 19:19:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DecodeStream.js
1.85 KB
lrw-r--r--
2026-02-14 19:19:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EncodeStream.js
3.13 KB
lrw-r--r--
2026-02-14 19:19:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Enum.js
533 B
lrw-r--r--
2026-02-14 19:19:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LazyArray.js
1.62 KB
lrw-r--r--
2026-02-14 19:19:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Number.js
2.23 KB
lrw-r--r--
2026-02-14 19:19:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Optional.js
920 B
lrw-r--r--
2026-02-14 19:19:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Pointer.js
4.09 KB
lrw-r--r--
2026-02-14 19:19:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Reserved.js
519 B
lrw-r--r--
2026-02-14 19:19:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
String.js
3.71 KB
lrw-r--r--
2026-02-14 19:19:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Struct.js
2.33 KB
lrw-r--r--
2026-02-14 19:19:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
723 B
lrw-r--r--
2026-02-14 19:19:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
VersionedStruct.js
3.01 KB
lrw-r--r--
2026-02-14 19:19:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).