Buckets:
| /** | |
| * hex dump helper class | |
| */ | |
| export function arrayToHex(array: Uint8Array<ArrayBuffer> | number[]) { | |
| let str = ''; | |
| for (let i = 0; i < array.length; i++) { | |
| let h = array[i].toString(16); | |
| if (h.length < 2) { | |
| h = '0' + h; | |
| } | |
| str += h; | |
| } | |
| return str; | |
| } | |
| export function hexToArrayBuffer(str: string): ArrayBuffer { | |
| return Uint8Array.from( | |
| str | |
| .replace(/^0x/, '') | |
| .replace(/([\da-fA-F]{2}) ?/g, '0x$1 ') | |
| .replace(/ +$/, '') | |
| .split(' '), | |
| ).buffer; | |
| } | |
| const Hex = { | |
| hexDump: arrayToHex, | |
| }; | |
| export default Hex; | |
Xet Storage Details
- Size:
- 574 Bytes
- Xet hash:
- 0e4a2e02e1a969a2d00ddfb6bda6ec2c189cb64ab2c5d8462325b590a5405be5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.