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 6119897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:36:22+00:00 2026-05-23T15:36:22+00:00

We need to convert huge numbers of UUIDS into xml-compatible strings. If we use

  • 0

We need to convert huge numbers of UUIDS into xml-compatible strings. If we use a Base32 algorithm (which maps each 5 bits to one of 32 characters) this leads to 26 char strings, if we us a Base62 algorithm (which iteratively divides the 128 bit integer by 62 and records the modulus as one of 62 characters) this leads to 22 char strings. While base62 returns shorter strings it is much more cpu-intensive, therefore we are stuck with Base32 (Base64 is not an option because of xml).

Do you know any other types of encoding algorithms that could help us here? Are there variants of Base32-like bit pattern encoding algorithms that could be used with bases that are not powers of 2? Or are there hybrid algorithms which combine approaches of the first with approaches of the second algorithm? We would like to reduce the char strings to less than 26 if possible.

  • 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-05-23T15:36:22+00:00Added an answer on May 23, 2026 at 3:36 pm

    You mentioned 62, which suggests that you are limiting your alphabet to A-Z (capitalised and lowercase) and the digits 0-9. Why not add another couple of XML compatible characters to that list, such as +, ., ~ or ! to bring that number up to 64? You’ll be be able to do bit-shifting rather than division, which should make the algorithm as fast as the Base32 one and reduce your string sizes.

    Edit: Since the restriction that these characters are also available for other as yet unspecified languages, you might care to escape some of your characters to represent your 64 options. If you use, for example, _ as an escape character you could have _1 and _2 represent options 63 and 64. The statistics mention in the original question suggest that UUIDS are 128-bits, so our Base64 would give us 22 characters if there is no escaping and, where up to 4 items are escaped, keeps within your 26 characters.

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

Sidebar

Related Questions

I need to convert HTML documents into valid XML, preferably XHTML. What's the best
I need to convert a value which is in a DateTime variable into a
I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM
I need to convert a Word document into HTML file(s) in Java. The function
I need to convert an arbitrary amount of milliseconds into Days, Hours, Minutes Second.
I need to convert → (&rarr) to a symbol I can type into a
I have huge 3D arrays of numbers in my .NET application. I need to
I am given a task to convert a huge table to custom XML file.
I need to convert a named instance of SQL server 2005, to a default
I need to convert a (possibly) null terminated array of ascii bytes to a

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.