Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compression > #2424

Re: Larger raw file but smaller compressed size

From glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups comp.compression
Subject Re: Larger raw file but smaller compressed size
Date 2014-07-02 02:16 +0000
Organization Aioe.org NNTP Server
Message-ID <lovq13$9o0$1@speranza.aioe.org> (permalink)
References <00b6e6f9-7d01-4d18-bdfa-5385a3667576@googlegroups.com>

Show all headers | View raw


Nick <nick@devx.co.nz> wrote:

(snip)
> We have a monthly automatic job that creates a database backup 
> (.bak) file (from SQL Server) and then zip it up using Winrar.
 
> Each month more data are being added to the database, 
> and so far when we look back at the compressed backup .rar files, 
> the size increases steadily from month to month, except for 
> this month, when the size actually is slightly smaller than 
> last month. However when I compare the .bak files inside 
> the rar files, they look like the correct sizes, i.e. the bak 
> files from current month is larger than the one from last month.
 
> My question is, is it possible for a larger raw file getting 
> compressed down to a smaller rar file, given that nothing has 
> been deleted from the database within the last month?

RAR uses LZW compression. I don't know very well what .bak files
look like, but if the changes are not just adding onto the end,
I think it is possible. 

LZW finds common substrings, and adding new data in the middle
that was similar to existing data might make it smaller.

Also, LZW dumps the dictionary and starts over when it gets
full. A change in the middle could delay that, and allow for
more compression.

-- glen

Back to comp.compression | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Larger raw file but smaller compressed size Nick <nick@devx.co.nz> - 2014-07-01 17:08 -0700
  Re: Larger raw file but smaller compressed size glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-07-02 02:16 +0000
    Re: Larger raw file but smaller compressed size nick@devx.co.nz - 2014-07-01 19:29 -0700

csiph-web