Skip to content
Implementation of base64 for V lang
V
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md Add a note about difference from stdlib version Oct 19, 2019
vbase64.v
vbase64_test.v

README.md

v-base64 0.1.0

Implementation of base64 encoding for V.

The only difference from base64 implementation in the V stdlib is that this library works with byte sequences instead of strings.

The version of this module will remain in 0.x.x unless the language API's are finalized and implemented.

Examples

import popzxc.vbase64

some_bytes := [byte(10), 20, 30, 40, 50]

encoded := vbase64.base64_encode(some_bytes)
decoded := vbase64.base64_decode(encoded) or {
    panic("Incorrect string passed")
}

assert string(some_bytes) == string(decoded)

Installaction

Via vpm:

v install popzxc.vbase64

Via vpkg:

vpkg get https://github.com/popzxc/vbase64

Contributing

Feel free to open pull requests!

License

MIT

You can’t perform that action at this time.