MiGBase64 is a very fast Base64 Codec written in Java. It is currently faster than any other Java codecs I know of and it doesn't create any temporary arrays which many others do.
This library is clone of http://migbase64.sourceforge.net/ project. It has been cloned here in github for following reasons.
- To Manvanify the project
- To Sync the artifacts to Maven Central
Other than that, code/tests are exactly same as original repository and same BSD license applies here as well. Full copyright of this library belongs to Mikael Grev.
To include this library, add following dependency. You can also add this using m2e artifact search.
Maven:
<dependency>
<groupId>com.brsanthu</groupId>
<artifactId>migbase64</artifactId>
<version>2.2</version>
</dependency>
Gradle:
compile("com.brsanthu:migbase64:2.2")
If you have any questions or issues about the functionality of the library, I would recommend you create an issue in sourceforce at http://sourceforge.net/p/migbase64/feature-requests/
However if the issue is related to artificat availability in Maven central, please create an issue here, in Github.
As groupId, I would have preferred to use migcomponents.com (due to http://www.migcomponents.com) but decided to use my own groupId brsanthu.com just so I can easily release artifacts into Maven Central using my existing account at https://oss.sonatype.org.
To encode use one of the Base64.encode*
methods and to decode one of Base64.decode*
methods.
Example:
System.out.println(Base64.encodeToString("Hello World".getBytes(StandardCharsets.UTF_8), false));
System.out.println(new String(Base64.decode("SGVsbG8gV29ybGQ="), StandardCharsets.UTF_8));
See Javadocs here
from http://migbase64.sourceforge.net/
from https://sourceforge.net/p/migbase64/news/?source=navbar
-
Added a "fast" decode method that is a little more than two times faster than the normal one but has some moderate restriction on input.
-
Normal decode now handles negative bytes and just disregard them as specified in RFC 2045.
-
Some minor enhancements
The initial release has been posted. Posted by Mikael Grev