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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:59:19+00:00 2026-05-13T17:59:19+00:00

I am trying to develop a paint brush application thru processingjs. This API has

  • 0

I am trying to develop a paint brush application thru processingjs.
This API has function loadPixels() that will load the RGB values in to the array.
Now i want to store the array in the server db.

The problem is the size of the array, when i convert to a string the size is 5 MB.

Is the best solution is to do compression at javascript level? How to do it?

  • 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-13T17:59:19+00:00Added an answer on May 13, 2026 at 5:59 pm

    See http://rosettacode.org/wiki/LZW_compression#JavaScript for an LZW compression example. It works best on longer strings with repeated patterns.

    From the Wikipedia article on LZW:

    A dictionary is initialized to contain
    the single-character strings
    corresponding to all the possible
    input characters (and nothing else
    except the clear and stop codes if
    they’re being used). The algorithm
    works by scanning through the input
    string for successively longer
    substrings until it finds one that is
    not in the dictionary. When such a
    string is found, the index for the
    string less the last character (i.e.,
    the longest substring that is in the
    dictionary) is retrieved from the
    dictionary and sent to output, and the
    new string (including the last
    character) is added to the dictionary
    with the next available code. The last
    input character is then used as the
    next starting point to scan for
    substrings.

    In this way, successively longer
    strings are registered in the
    dictionary and made available for
    subsequent encoding as single output
    values. The algorithm works best on
    data with repeated patterns, so the
    initial parts of a message will see
    little compression. As the message
    grows, however, the compression ratio
    tends asymptotically to the
    maximum.

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

Sidebar

Related Questions

I am trying to develop an android application that will stream the video from
We are trying to develop an application that send messages to a service, but
I am currently trying to develop a GAE application. I followed this tutorial in
I'm trying to develop a JQuery plug-in that will access an outside XML feed
I am trying to develop an application which has a button, which on clicking
I am trying to develop a simple map application, which will display a map
I am trying to develop a .NET 3.5 service application that uses: WCF for
I'm trying to develop an application using Google's maps and I can't get this
this time im trying to develop a printer application which allow me to transform
I've been trying to develop a CALayer based CardView object that has two layers

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.