PoneyClairDeLune / korg87

🧐 Encode binary data with KORG 7 on 8 encoding.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

korg87

🧐 Encode binary data with KORG 7 on 8 encoding.

This project is a response to How the Great Firewall of China Detects and Blocks Fully Encrypted Traffic, as the encoding scheme used in the project...

  • Cannot have randomness exceed 87.5%.
  • If input can be considered fully random, at around 75% of the bytes are printable.

API

Korg87

.encodeLength(length)

Estimate encode length.

.decodeLength(length)

Estimate decode length.

.encodeBlock(inputSlice, outputSlice)

Encode a 7-byte (or less) block.

.decodeBlock(inputSlice, outputSlice)

Decode a 8-byte (or less) block.

.encodeBytes(inputBuffer, outputBuffer)

Encode Uint8Array.

.decodeBytes(inputBuffer, outputBuffer)

Decode Uint8Array.

.encodeSync(inputBuffer, outputBuffer)

Encode any of ArrayBuffer or TypedArray.

.decodeSync(inputBuffer, outputBuffer)

Encode any of ArrayBuffer or TypedArray.

.encode(inputBuffer, outputBuffer)

Async version of .encodeSync.

.decode(inputBuffer, outputBuffer)

Async version of .decodeSync.

About

🧐 Encode binary data with KORG 7 on 8 encoding.

License:MIT License


Languages

Language:JavaScript 99.7%Language:Shell 0.3%