Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clojure/data.codec
Native codec implementations
https://github.com/clojure/data.codec
Last synced: 4 days ago
JSON representation
Native codec implementations
- Host: GitHub
- URL: https://github.com/clojure/data.codec
- Owner: clojure
- License: epl-1.0
- Created: 2011-10-12T12:13:33.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2024-07-15T18:00:54.000Z (6 months ago)
- Last Synced: 2024-12-28T14:03:35.195Z (11 days ago)
- Language: Clojure
- Homepage: http://clojure.org
- Size: 76.2 KB
- Stars: 76
- Watchers: 28
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# data.codec
Native codec implementations. Currently only base64 has been implemented.
API documentation: https://clojure.github.io/data.codec
## base64
NOTE: Superseded by [Base64](https://docs.oracle.com/javase/8/docs/api/java/util/Base64.html), included in the JDK since Java 8.
Implements the standard base64 encoding character set, but does not yet support automatic fixed line-length encoding.
All operations work on either byte arrays or Input/OutputStreams.
Performance is on par with Java implementations, e.g., Apache commons-codec.
### Example Usage
Transform a binary file into a base64 encoded file:
```clojure
(require '[clojure.data.codec.base64 :as b64]
'[clojure.java.io :as io])(with-open [in (io/input-stream "input.bin")
out (io/output-stream "output.b64")]
(b64/encoding-transfer in out))
```## Installation
The data.codec library is available in Maven central. Add it to your Maven project's `pom.xml`:
org.clojure
data.codec
0.1.1
or your leiningen `project.clj`:
[org.clojure/data.codec "0.1.1"]
## License
Copyright © Alex Taggart, Rich Hickey, and contributors
Licensed under the EPL. (See the file epl.html.)