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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:52:19+00:00 2026-05-27T15:52:19+00:00

I have a X bytes file. And I want to compress it in block

  • 0

I have a X bytes file. And I want to compress it in block of size 32Kb, for example.
Is there any lib that Can I do this?

I used Zlib for Delphi but I just can compress a full file in new compressed file.

Tranks a lot,
Pedro

  • 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-27T15:52:20+00:00Added an answer on May 27, 2026 at 3:52 pm

    Why don’t you use a simple header to determine block boundaries? Consider this:

    1. Read fixed amount of data from input into a buffer (say 32 KiB)
    2. Compress that buffer with a “freshly created” deflate stream (underlying compression algorithm of ZLIB).
    3. Write compressed size to output stream
    4. Write compressed data to output stream
    5. Go to step 1 until you reach end-of-file.

    Pros:

    1. You can decompress any block even in multi-threaded fashion.
    2. Data corruption only limited to corrupted block. Rest of data can be restored.

    Cons:

    1. You loss most of contextual information (similarities between data). So, you will have lower compression ratio.
    2. You need slightly more work.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a 2884765579 bytes file. This is double checked with this function, that
Is there any way to read specific bytes from a file? For example, I
I want to convert a single number of bytes, into a file size (that
I have this file which I need to read the first bytes to check
Suppose I have a source file that is 18218 bytes. I open the file
I have a binary file that I would like to regex search/replace hex bytes
I am reading a file byte-by-byte. Say for example i have this byte: 0x41
For example, I want to zip a file stored in /Users/me/Desktop/image.jpg I made this
For any given file data size, I want to be able to resize (or
I have an URI image file, and I want to reduce its size to

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.