Update dashboard, kb, memory +4 more (+28 ~18 -1)

This commit is contained in:
Echo
2026-02-06 14:25:10 +00:00
parent 7f64d5054a
commit 19d178268a
6767 changed files with 1346472 additions and 1282 deletions

29
node_modules/@exodus/bytes/multi-byte.node.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
import { assertUint8 } from './assert.js'
import { isDeno, toBuf } from './fallback/_utils.js'
import { isAsciiSuperset, multibyteDecoder, multibyteEncoder } from './fallback/multi-byte.js'
import { isAscii } from 'node:buffer'
export function createMultibyteDecoder(encoding, loose = false) {
const jsDecoder = multibyteDecoder(encoding, loose) // asserts
let streaming = false
const asciiSuperset = isAsciiSuperset(encoding)
return (arr, stream = false) => {
assertUint8(arr)
if (!streaming) {
if (arr.byteLength === 0) return ''
if (asciiSuperset && isAscii(arr)) {
if (isDeno) return toBuf(arr).toString()
return toBuf(arr).latin1Slice(0, arr.byteLength) // .latin1Slice is faster than .asciiSlice
}
}
streaming = stream
return jsDecoder(arr, stream)
}
}
export function createMultibyteEncoder(encoding, { mode = 'fatal' } = {}) {
// TODO: replacement, truncate (replacement will need varying length)
if (mode !== 'fatal') throw new Error('Unsupported mode')
return multibyteEncoder(encoding) // asserts
}