REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.62 KB
Close
/home/byroehnu/.trash/node_modules11/restructure/src/LazyArray.js
Text
Base64
import {Array as ArrayT} from './Array.js'; import {Number as NumberT} from './Number.js'; import * as utils from './utils.js'; export class LazyArray extends ArrayT { decode(stream, parent) { const { pos } = stream; const length = utils.resolveLength(this.length, stream, parent); if (this.length instanceof NumberT) { parent = { parent, _startOffset: pos, _currentOffset: 0, _length: length }; } const res = new LazyArrayValue(this.type, length, stream, parent); stream.pos += length * this.type.size(null, parent); return res; } size(val, ctx) { if (val instanceof LazyArrayValue) { val = val.toArray(); } return super.size(val, ctx); } encode(stream, val, ctx) { if (val instanceof LazyArrayValue) { val = val.toArray(); } return super.encode(stream, val, ctx); } } class LazyArrayValue { constructor(type, length, stream, ctx) { this.type = type; this.length = length; this.stream = stream; this.ctx = ctx; this.base = this.stream.pos; this.items = []; } get(index) { if ((index < 0) || (index >= this.length)) { return undefined; } if (this.items[index] == null) { const { pos } = this.stream; this.stream.pos = this.base + (this.type.size(null, this.ctx) * index); this.items[index] = this.type.decode(this.stream, this.ctx); this.stream.pos = pos; } return this.items[index]; } toArray() { const result = []; for (let i = 0, end = this.length; i < end; i++) { result.push(this.get(i)); } return result; } }
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).