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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:24:21+00:00 2026-05-12T10:24:21+00:00

My ASP.NET page has following query string parameter: …?IDs=1000000012,1000000021,1000000013,1000000022&… Here IDs parameter will always

  • 0

My ASP.NET page has following query string parameter:

…?IDs=1000000012,1000000021,1000000013,1000000022&...

Here IDs parameter will always have numbers separated by something, in this case ,. Currently there are 4 numbers but normally they would be in between 3 and 7.

Now, I am looking for method to convert each big number from above into smallest possible value; specifically compressing value of IDs query string parameter. Both, compressing each number algorithm or compressing whole value of IDs query string parameter are welcome.

  1. Encode or decode is not an issue; just compressing the value IDs query string parameter.
  2. Creating some unique small value for IDs and then retrieving its value from some data source is out of scope.

Is there an algorithm to compress such big numbers to small values or to compress value of the IDs query string parameter all together?

  • 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-12T10:24:21+00:00Added an answer on May 12, 2026 at 10:24 am

    You basically need so much room for your numbers because you are using base 10 to represent them. An improvement would be to use base 16 (hex). So for example, you could represent 255 (3 digits) as ff (2 digits).

    You can take that concept further by using a much larger number base… the set of all characters that are valid query string parameters:

    A-Z, a-z, 0-9, ‘.’, ‘-‘, ‘~’, ‘_’, ‘+’

    That gives you a base of 67 characters to work with (see Wikipedia on QueryString).

    Have a look at this SO post for approaches to converting base 10 to arbitrary number bases.

    EDIT:

    In the linked SO post, look at this part:

    string xx = IntToString(42, 
                new char[] { '0','1','2','3','4','5','6','7','8','9',
                'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
                'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x'});
    

    That’s almost what you need. Just expand it by adding the few characters it is missing:

    yz.-~_+

    That post is missing a method to go back to base 10. I’m not going to write it 🙂 but the procedure is like this:

    Define a counter I’ll call TOTAL.

    Look at the right most character and find it’s position in the array.
    TOTAL = (the position of the character in the array)
    Example: Input is BA1. TOTAL is now 1 (since “1” is in position 1 in the array)

    Now look at the next character left of the first one and find it’s position in the array.
    TOTAL += 47 * (the position of the character in the array)
    Example: Input is BA1. TOTAL is now (47 * 11) + 1 = 518

    Now look at the next character left of the previous one and find it’s position in the array.
    TOTAL += 47 * 47 * (the position of the character in the array)
    Example: Input is BA1. Total is now (47 * 47 * 10) + (47 * 11) + 1 = 243508

    And so on.

    I suggest you write a unit test that converts a bunch of base 10 numbers into base 47 and then back again to make sure your conversion code works properly.

    Note how you represented a 6 digit base 10 number in just 3 digits of base 47 🙂

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

Sidebar

Ask A Question

Stats

  • Questions 229k
  • Answers 229k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In MySQL a view is generally executed only when it's… May 13, 2026 at 1:45 am
  • Editorial Team
    Editorial Team added an answer The JRE is the Java Runtime Environment. It is a… May 13, 2026 at 1:45 am
  • Editorial Team
    Editorial Team added an answer You could probably do this either via a theme or… May 13, 2026 at 1:45 am

Related Questions

My ASP.NET page has following query string parameter: …?IDs=1000000012,1000000021,1000000013,1000000022&... Here IDs parameter will always
I have object A which in turn has a property of type Object B
This query is related to this one I asked yesterday. I have a radio
I have the following situation: A user will define a certain filter on a
I have two SqlDataSource controls on a page. One loads high level data and

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.