Packages

builtin
cbindgen
core
core.alloc
core.alloc.arena
core.alloc.atomic
core.alloc.debug
core.alloc.fixed
core.alloc.gc
core.alloc.heap
core.alloc.log
core.alloc.memwatch
core.alloc.pool
core.alloc.ring
core.arg_parse
core.array
core.avl_tree
core.bucket_array
core.conv
core.crypto
core.crypto.keys
core.doc
core.encoding
core.encoding.base64
core.encoding.csv
core.encoding.hex
core.encoding.json
core.encoding.kdl
core.encoding.osad
core.encoding.utf8
core.encoding.xml
core.hash
core.hash.md5
core.hash.sha1
core.hash.sha256
core.heap
core.intrinsics
core.intrinsics.atomics
core.intrinsics.onyx
core.intrinsics.types
core.intrinsics.wasm
core.io
core.io.binary
core.iter
core.js
core.list
core.map
core.math
core.memory
core.misc
core.net
core.os
core.random
core.set
core.slice
core.string
core.sync
core.test
core.thread
core.time
main
runtime
runtime.info
runtime.platform
runtime.vars
simd

package core.encoding.base64

A simple Base64 encoding and decoding library. Currently only supports base64 with + and / characters. A simple find and replace could be used to change to other base64 standards.

decode
decode :: (data: [] u8, allocator: Allocator) -> [] u8

Decodes the given base64 data into a new buffer, allocated from the allocator provided.

decode_url
decode_url :: (data: [] u8, allocator: Allocator) -> [] u8

Decodes the given base64 data into a new buffer, allocated from the allocator provided.

encode
encode :: (data: [] u8, allocator: Allocator) -> [] u8

Encodes the given data in base64 into a new buffer, allocated from the allocator provided. It is the callers responsibilty to free this memory.

encode_url
encode_url :: (data: [] u8, allocator: Allocator) -> [] u8