Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8839229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:11:35+00:00 2026-06-14T10:11:35+00:00

My project at work is using the Jackson JSON serializer to convert a bunch

  • 0

My project at work is using the Jackson JSON serializer to convert a bunch of Java objects into Strings in order to send them to REST services.

Some of these objects contain sensitive data, so I’ve written custom serializers to serialize these objects to JSON strings, then gzip them, then encrypt them using AES;

This turns the strings into byte arrays, so I use the Base64 encoder in Apache commons codec to convert the byte arrays into strings. The custom deserializers behind the REST interfaces reverse this process:

base64 decode -> decrypt -> decompress -> deserialize using default Jackson deserializer.

Base64 encoding increases the size of the output (the gzip step in serialization is meant to help ameliorate this increase), so I checked Google to see if there was a more efficient alternative, which led me to this previous stackoverflow thread that brought up Ascii85 encoding as a more efficient alternative –

Base64 adds 33% to the size of the output, Ascii85 adds 25% to the size of the output.

I found a few Java Ascii85 implementations e.g. Apache pdfbox, but I’m a bit leery to use the encoding – it seems like hardly anybody is using or implementing it, which might just mean that Base64 has more inertia, or which may instead mean that there’s some wonky problem with Ascii85.

Does anybody know more on this subject? Are there any problems with Ascii85 that mean that I should use Base64 instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:11:36+00:00Added an answer on June 14, 2026 at 10:11 am

    Base64 is way more common. The difference in size really isn’t that significant in most cases, and if you add at the HTTP level (which will compress the base64) instead of within your payload, you may well find the difference goes away entirely.

    Are there any problems with Ascii85 that mean that I should use Base64 instead?

    I would strongly advise using base64 just because it’s so much more widespread. It’s pretty much the canonical way of representing binary data as text (unless you want to use hex, of course).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using mongoDB for a new project at work and I got into
I have a java project which I work on using Eclipse ide. I have
I recently got involved in a Java project at work: we're using MyEclipse for
I'm using SCons to build a project at work, and I'm trying to parse
For a project at work, we're considering using the Maven plugin for Eclipse to
We're using Trac as the task management tool at the project we work in.
I currently work on a tracking project using a GPS receiver and a modem
I just began using Visual Studio to work on a practice .NET project. I
At work, we recently started a project using CouchDB (a document-oriented database). I've been
On my current project, I am using FxCop to work through various code analysis

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.