OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Javascript text compression

  • Thread starter Thread starter malik amanullah
  • Start date Start date
M

malik amanullah

Guest
I have tried "pako" and lz-string" Both. I need text compression of 25% or lower. I am trying to convert 1000 Characters to 222 or less chars after compression. pako do a good job than lz string. Lz string reduced 1k chars to max 800 chars, while pako reduced 1k chars to 550 chars. its good enough but not much to go below 222.

As memos of blockchain transactions usually dont allow more than 200-230 chars in memo. I need to send user texts on Memo to on-chain. But user text inputs are usually more than 1k, lets say they are max 1k we can put limit to 1k, we need a way to reduce text chars to 222 or less.

In short i need some js compression method (to run in browser in next js app) that can compress 1000 text characters (not words) to mere 222 or less.

Some important notes: user will input text, then we will compress it to 222 or les chars This will be gone permanatly on-chain. Then i need to show it decompressed in my app.

means Almost all work is done in user browser, no apis should be here, only js in-broswer libraries etc or something.

I already tried different encoding compression methods of pako and lz-string, but both dont seem to go under 500 chars for 1000 chars input

<p>I have tried "pako" and lz-string" Both. I need text compression of 25% or lower.
I am trying to convert 1000 Characters to 222 or less chars after compression.
pako do a good job than lz string. Lz string reduced 1k chars to max 800 chars, while pako reduced 1k chars to 550 chars. its good enough but not much to go below 222.</p>
<p>As memos of blockchain transactions usually dont allow more than 200-230 chars in memo. I need to send user texts on Memo to on-chain. But user text inputs are usually more than 1k, lets say they are max 1k we can put limit to 1k, we need a way to reduce text chars to 222 or less.</p>
<p>In short i need some js compression method (to run in browser in next js app) that can compress 1000 text characters (not words) to mere 222 or less.</p>
<p>Some important notes:
user will input text, then we will compress it to 222 or les chars
This will be gone permanatly on-chain.
Then i need to show it decompressed in my app.</p>
<p>means Almost all work is done in user browser, no apis should be here, only js in-broswer libraries etc or something.</p>
<p>I already tried different encoding compression methods of pako and lz-string, but both dont seem to go under 500 chars for 1000 chars input</p>
 

Latest posts

Top