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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:42:06+00:00 2026-06-07T20:42:06+00:00

Is there a text compression library for Erlang? When working with very long strings,

  • 0

Is there a text compression library for Erlang? When working with very long strings, it may be advantageous to compress the character data. Has anyone compressed text or thought of a way to do it in Erlang?

I was thinking of using the zip module, but instead of working with files, I work in-memory like this:

compress(LargeText)->
    Binary = list_to_binary(LargeText),
    {ok,{_,Zipped}} = zip:zip("ZipName",[{"Name",Binary}],[memory]),
    Zipped.

Then I would unzip the text back into memory when I need it. Like this:

{ok,[{"Name",Binary}]} = zip:unzip(Zipped,[memory]).

My Erlang application is supposed to be part of a middle tier in which large text may have to pass through to, and out of a storage system. The storage system is intended on storing large text. To optimize the storage, there is need to compress it before sending it. Assume that the text value is like a CLOB data type in Oracle Database. I am thinking that if I combine the zipping and the erlang:garbage_collect/0, i can pull it off.

Or if it’s not possible in Erlang, perhaps it is possible using a system call via os:cmd({Some UNIX script}) and then I would grab the output in Erlang? If there’s a better way, please show 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-06-07T20:42:09+00:00Added an answer on June 7, 2026 at 8:42 pm

    There is a zlib module for Erlang, which supports in-memory compression and decompression.

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

Sidebar

Related Questions

I am using zlib to compress a stream of text data. The text data
I'm working on a JavaScript collator/compositor implemented in Java. It works, but there has
Is there a text equivalent of CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol provided as a property in C#. e.g.
I have passed Python list to template like l=['text','there is no salary','I need alcohol','and
i want to show an alertview while other thread(in other thread there is text
I have a div with a width of 200px. There is text inside that
Are there any free text-to-speech libraries available for Windows Mobile? Preferably with a C#
I have a webpage where there are few text fields to be filled up
A recent problem* left me wondering whether there is a text editor out there
I need to check in some fast way if there is any text nodes

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.