Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 396 Bytes

README.md

File metadata and controls

24 lines (14 loc) · 396 Bytes

js二级制计算

安装

yarn add zoom-hex

使用

split(包,长度),将打包分成小包 (ArrayBuffer)

str2bytes : string=>Uint8Array

str2hex :string=>ArrayBuffer

toDigist : number=>string 16进制

hex2str(hex,start,len) ArrayBuffer/Uint8Array/Array => string  将start开始的len长度的二进制,转为hex string

copyOf : 拷贝ArrayBuffer/Uint8Array/Array