jgit/org.eclipse.jgit
Thomas Wolf 501fc0dadd ApplyCommand: add a base-85 codec
Add an implementation for base-85 encoding and decoding [1]. Git binary
patches use this format.

Base-85 encoding assembles bytes as 32-bit MSB values, then converts
these values to base-85 numbers (always 5 bytes) encoded as printable
ASCII characters. Decoding base-85 is the reverse operation. Note
that decoding may overflow on invalid input as 85^5 > 2^32. Encodings
always have a length that is a multiple of 5. If input length is not
divisible by 4, padding bytes are (logically) added, which are ignored
when decoding. The encoding for n bytes has thus always exactly length
(n + 3) / 4 * 5 in integer arithmetic (truncating division).

Includes tests.

[1] https://datatracker.ietf.org/doc/html/rfc1924

Bug: 371725
Change-Id: Ib5b9a503cd62cf70e080a4fb38c8cd1eeeaebcfe
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-05-26 00:37:45 +02:00
..
.settings Fix @since tag for introduction of PUBKEY_ACCEPTED_ALGORITHMS 2021-05-14 09:02:46 +02:00
META-INF Prepare 5.12.0-SNAPSHOT builds 2021-03-10 16:34:28 +01:00
findBugs [spotbugs] Silence NP_BOOLEAN_RETURN_NULL in IgnoreNode#checkIgnored 2020-12-22 10:52:59 +01:00
resources/org/eclipse/jgit ApplyCommand: add a base-85 codec 2021-05-26 00:37:45 +02:00
src/org/eclipse/jgit ApplyCommand: add a base-85 codec 2021-05-26 00:37:45 +02:00
.classpath Change JGit minimum execution environment to JavaSE-1.8 2016-09-20 11:32:36 +02:00
.fbprefs
.gitignore
.project
BUILD Fix stamping to produce stable file timestamps 2020-12-14 15:45:29 +01:00
about.html SHA-1: collision detection support 2017-02-28 16:38:43 -08:00
build.properties
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 5.12.0-SNAPSHOT builds 2021-05-06 09:53:25 +02:00