commit | 6b67d6f093a821ede0b393f260b407d035289e07 | [log] [tgz] |
---|---|---|
author | Alexander Pinske <alex@pinske.eu> | Mon May 10 21:36:22 2021 +0200 |
committer | Alex Herbert <aherbert@apache.org> | Fri May 21 21:18:51 2021 +0100 |
tree | 62089cbf3bf1a549a380a6c30e714a22e49d2a60 | |
parent | a66b760e7327a8abf57e9e8a5c82cfdd957770de [diff] |
CODEC-301: Reduce byte[] allocations by reusing buffers * Reduces byte[] allocations from 280MB to <4MB when reading a 133MB base64 stream. Messured with JFR. * Keep reusing inital buffer when decoding BaseN * Attempt to fill up the user-provided buffer Previously we only filled up to a maximum of 8KB - encoding-overhead (e.g. 6KB for Base64) even if the provided buffer was bigger. * Reuse hasData method for checking pos/readPos markers
The Apache Commons Codec package contains simple encoder and decoders for various formats such as Base64 and Hexadecimal. In addition to these widely used encoders and decoders, the codec package also maintains a collection of phonetic encoding utilities.
More information can be found on the Apache Commons Codec homepage. The Javadoc can be browsed. Questions related to the usage of Apache Commons Codec should be posted to the user mailing list.
You can download source and binaries from our download page.
Alternatively you can pull it from the central Maven repositories:
<dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.15</version> </dependency>
We accept Pull Requests via GitHub. The developer mailing list is the main channel of communication for contributors. There are some guidelines which will make applying PRs easier for us:
mvn clean test
.If you plan to contribute on a regular basis, please consider filing a contributor license agreement. You can learn more about contributing via GitHub in our contribution guidelines.
This code is under the Apache Licence v2.
See the NOTICE.txt
file for required notices and attributions.
You like Apache Commons Codec? Then donate back to the ASF to support the development.
#apache-commons
IRC channel on irc.freenode.org