https://github.com/lost22git/base64_value.cr
Lazy Base64Value wrapper
https://github.com/lost22git/base64_value.cr
base64 crystal lazy
Last synced: about 2 months ago
JSON representation
Lazy Base64Value wrapper
- Host: GitHub
- URL: https://github.com/lost22git/base64_value.cr
- Owner: lost22git
- License: mit
- Created: 2024-06-09T15:31:44.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-13T10:35:34.000Z (11 months ago)
- Last Synced: 2025-02-05T21:25:39.794Z (4 months ago)
- Topics: base64, crystal, lazy
- Language: Crystal
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# base64_value
Lazy Base64Value wrapper
[API DOC](https://lost22git.github.io/base64_value.cr)
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
base64_value:
github: lost22git/base64_value.cr
```2. Run `shards install`
## Usage
```crystal
require "base64_value"base64_value = Base64Value.parse "Y3J5c3RhbA=="
# or
# base64_value = Base64Value.from_bytes UInt8.static_array(99, 114, 121, 115, 116, 97, 108).to_slice# or
# base64_value = Base64Value.from_plain "crystal"puts base64_value.to_s # => "Y3J5c3RhbA=="
puts base64_value.to_bytes # => Bytes[99, 114, 121, 115, 116, 97, 108]
puts base64_value.to_plain # => crystal```
## Development
### Run tests
```
crystal spec --progress
```## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Contributors
- [lost](https://github.com/your-github-user) - creator and maintainer