An open API service indexing awesome lists of open source software.

https://github.com/rorycl/base64toraw

golang module for wrapping both rawstd and std base64 encoded content so both types can be read by a base64.RawStdEncoding decoder.
https://github.com/rorycl/base64toraw

base64 base64-decoding base64decoder golang golang-library golang-package

Last synced: about 2 months ago
JSON representation

golang module for wrapping both rawstd and std base64 encoded content so both types can be read by a base64.RawStdEncoding decoder.

Awesome Lists containing this project

README

        

# base64toraw

v0.0.1 : 25 January 2025

## Details

package base64translator is a very simple translator for taking either
base64.StdEncoded data to base64.RawStdEncoded to allow both to be read
by base64.RawStdEncoding decoding.

This is best used in cases where you aren't sure whether you will be
receiving base64.StdEncoded or base64.RawStdEncoded data.

Usage example:

```golang
b64 := NewBase64ToRaw(bytes.NewReader(encodedBytes))
b, err := io.ReadAll(base64.NewDecoder(base64.RawStdEncoding, b64))
```

## Licence

This project is licensed under the [MIT Licence](LICENCE).