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

  • SEARCH
  • Home
  • 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 8457541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:50:04+00:00 2026-06-10T12:50:04+00:00

Is it possible to find and replace any repetitive characters in a string using

  • 0

Is it possible to find and replace any repetitive characters in a string using C#? I’m trying to reduce the size of a base64 string, which is converted from a jpeg image. I’ve noticed that the base64 strings contain many repeated characters such as:

6qdQAUUxJA7uuCGQ8g/wA6fQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFYXiFL5b7TrmwtzM8Xmr7KWUAE+

If there was a way to remove the repetitive characters with something like this it would overall be much smaller:

[QAUUUUAFFFFABRRR, 18]

This is in the format of [REPEATED-CHARACTERS, NUMBER-OF-TIMES].
Would this be possible to do? Thanks for the help. 🙂

  • 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-10T12:50:05+00:00Added an answer on June 10, 2026 at 12:50 pm

    You’re essentially trying to come up with your own lossless compression algorithm – algorithms like zip work by doing exactly what you’re asking for, except that they work on bytes rather than characters in a string.

    Popular compression algorithms are virtually guaranteed to be more efficient than something you can design and implement in a reasonable amount of time. For one, they will probably see patterns that aren’t evident in the base64 string due to byte alignment issues.

    So why not just use one of them to compress the binary data before base64-encoding it, instead of the other way around?

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

Sidebar

Related Questions

Possible Duplicate: Find text string using jQuery? How do you find a text string
Is it possible to find out which page the user was previously browsing from
Possible Duplicate: How to find and replace symbols in a string? Sorry if the
Possible Duplicate: Find and Replace more than 1 word? I want to use jQuery
Is it possible to find and replace in selected text in Snow Leopard Xcode
Possible Duplicate: How do I write a regex to find and replace मेरा नाम
Is it possible to find which method was called on an object without having
Is it possible to find the database technology using for a website. eg. www.example.com/
I've looked around, and did not find any information to create numpy.float64 using the
Possible Duplicate: Removing carriage return and new-line from the end of a string in

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.