REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 2.06 KB
Close
/opt/alt/alt-nodejs24/root/lib/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-codec.js
Text
Base64
"use strict" var Buffer = require("safer-buffer").Buffer // Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that // correspond to encoded bytes (if 128 - then lower half is ASCII). exports._sbcs = SBCSCodec function SBCSCodec (codecOptions, iconv) { if (!codecOptions) { throw new Error("SBCS codec is called without the data.") } // Prepare char buffer for decoding. if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) { throw new Error("Encoding '" + codecOptions.type + "' has incorrect 'chars' (must be of len 128 or 256)") } if (codecOptions.chars.length === 128) { var asciiString = "" for (var i = 0; i < 128; i++) { asciiString += String.fromCharCode(i) } codecOptions.chars = asciiString + codecOptions.chars } this.decodeBuf = Buffer.from(codecOptions.chars, "ucs2") // Encoding buffer. var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)) for (var i = 0; i < codecOptions.chars.length; i++) { encodeBuf[codecOptions.chars.charCodeAt(i)] = i } this.encodeBuf = encodeBuf } SBCSCodec.prototype.encoder = SBCSEncoder SBCSCodec.prototype.decoder = SBCSDecoder function SBCSEncoder (options, codec) { this.encodeBuf = codec.encodeBuf } SBCSEncoder.prototype.write = function (str) { var buf = Buffer.alloc(str.length) for (var i = 0; i < str.length; i++) { buf[i] = this.encodeBuf[str.charCodeAt(i)] } return buf } SBCSEncoder.prototype.end = function () { } function SBCSDecoder (options, codec) { this.decodeBuf = codec.decodeBuf } SBCSDecoder.prototype.write = function (buf) { // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. var decodeBuf = this.decodeBuf var newBuf = Buffer.alloc(buf.length * 2) var idx1 = 0; var idx2 = 0 for (var i = 0; i < buf.length; i++) { idx1 = buf[i] * 2; idx2 = i * 2 newBuf[idx2] = decodeBuf[idx1] newBuf[idx2 + 1] = decodeBuf[idx1 + 1] } return newBuf.toString("ucs2") } SBCSDecoder.prototype.end = function () { }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
tables
DIR
-
drwxr-xr-x
2026-05-14 18:53:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dbcs-codec.js
19.98 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dbcs-data.js
8.67 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
670 B
lrw-r--r--
2026-04-24 15:56:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
internal.js
6.41 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
sbcs-codec.js
2.06 KB
lrw-r--r--
2026-04-24 15:56:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
sbcs-data-generated.js
31.28 KB
lrw-r--r--
2026-04-24 15:56:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
sbcs-data.js
4.42 KB
lrw-r--r--
2026-04-24 15:56:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utf7.js
8.38 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utf16.js
4.98 KB
lrw-r--r--
2026-04-24 15:56:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utf32.js
8.85 KB
lrw-r--r--
2026-04-24 15:56:04
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).