Skip to content

oboard/base16384-moonbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oboard/base16384

Version GitHub Workflow Status (with event) License

Encode binary file to printable utf16be, and vice versa.

It is a MoonBit reimplementation of base16384.

API

fn decode(Array[UInt16]) -> ArrayView[Byte]

fn decode_str(String) -> String raise

fn encode(Array[Byte]) -> Array[UInt16]

fn encode_str(String) -> String

Examples

///|
let input = "hello world"
let encoded = @base16384.encode_str(input)
let decoded = @base16384.decode_str(encoded)
inspect(encoded, content="栙擆羼湷槜瓆帀㴄")
inspect(decoded, content="hello world")

About

base16384 for moonbit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published