1. Compression idea

I have a idea for compression tho i cant make it work(as yet).
the idea is to build a dictonary) and
index to it with X,Y where
X is the start of the fragment
Y is the length of it
X is 2/3/4 bytes (varries with file) half bytes wold work too
Y is 1/2/3 bytes                     "
so that a compressed file looks like
(byte setup)(dictonary)(xy)(xy)(xy)(xy)
I can not find a good way to build the diconary
Anyone know how to do this???

PS:Has this been done by someone else??

J Reeves
Grape Vine
ICQ# 13728824

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

new topic     » topic index » view message » categorize

2. Re: Compression idea

------=_NextPart_001_0001_01C082E7.34C11820

Hello Grape_,

Try using match() and equal() to find repeted strings. Don't bother with
strings that are too short or not used enough to mak it worth compressing
them.

later,
Lewis Townsend
I can not find a good way to build the diconary
Anyone know how to do this???<br clear=3Dall><hr>Get your FREE download o=
f MSN Explorer at <a href=3D"http://explorer.msn.com">http://explorer.msn=
com</a><br></p>

------=_NextPart_001_0001_01C082E7.34C11820

<HTML><BODY STYLE=3D"font:10pt verdana; border:none;"><DIV>Hello Grape_,<=
/DIV> <DIV>&nbsp;</DIV> <DIV>Try using match() and equal() to find repete=
d strings. Don't bother with</DIV> <DIV>strings that are too short or not=
 used enough to mak it worth compressing</DIV> <DIV>them.</DIV> <DIV>&nbs=
p;</DIV> <DIV>later,<BR>Lewis Townsend</DIV> <BLOCKQUOTE style=3D"BORDER-=
LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEF=
T: 5px; PADDING-RIGHT: 0px">I can not find a good way to build the dicona=
R><br clear=3Dall><hr>Get your FREE download of MSN Explorer at <a href=3D=

------=_NextPart_001_0001_01C082E7.34C11820--

new topic     » goto parent     » topic index » view message » categorize

3. Re: Compression idea

The problem is just how to decide what is a sting of data that belongs in
the dictionary.

>From: Lewis Townsend <keroltarr at HOTMAIL.COM>
>Reply-To: Euphoria Programming for MS-DOS <EUPHORIA at LISTSERV.MUOHIO.EDU>
>To: EUPHORIA at LISTSERV.MUOHIO.EDU
>Subject: Re: Compression idea
>Date: Sat, 20 Jan 2001 13:45:10 -0600
>
>Hello Grape_,
>
>Try using match() and equal() to find repeted strings. Don't bother with
>strings that are too short or not used enough to mak it worth compressing
>them.
>
>later,
>Lewis Townsend
>I can not find a good way to build the diconary
>Anyone know how to do this???<br clear=all><hr>Get your FREE download of
>MSN Explorer at <a

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

new topic     » goto parent     » topic index » view message » categorize

4. Re: Compression idea

Hello Grape_,

>The problem is just how to decide what is a sting of data that belongs in
>the dictionary.

I started writing a compression library based on a "similar"
idea at one time. However, when I got it finished, it didn't
provide very good compression. Don't be discouraged by my lack
of success since your idea is significantly different that my
word "similar" above is a debatable. The similarity however
was that it DID search for repeated strings so that they
could be replaced by something shorter. I don't have the
file available at this computer but I think the search code
was something like this:

sequence source -- is the source string
constant slen = length( source )
integer len -- length of current segment
sequence s -- current segment

for len = 2 to floor( slen/2 ) do -- slen/2 is maximum seg length
  for pos = 1 to slen-len do -- try every segment in the source
    s = source[pos..pos+len] -- extract segment
    if match( s, source[pos+len..slen] ) -- is there any more of it?
      --this is a repeated string
    end if
  end for
end for

I hope this is somehow helpful as it is completely un-tested.

later,
Lewis Townsend
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

new topic     » goto parent     » topic index » view message » categorize

5. Re: Compression idea

It does help, Give's me a idea of what work,
Even if not as well as planed. I am working
on fixing the length of the dictionary word
to 6 or 8 bytes, it take's 3-5 bytes to
index into the dictionary, So even if its
not great its a start for better search's

Grape

>From: Lewis Townsend <keroltarr at HOTMAIL.COM>
>Reply-To: Euphoria Programming for MS-DOS <EUPHORIA at LISTSERV.MUOHIO.EDU>
>To: EUPHORIA at LISTSERV.MUOHIO.EDU
>Subject: Re: Compression idea
>Date: Tue, 23 Jan 2001 16:36:19 -0600
>
>Hello Grape_,
>
>>The problem is just how to decide what is a sting of data that belongs in
>>the dictionary.
>
>I started writing a compression library based on a "similar"
>idea at one time. However, when I got it finished, it didn't
>provide very good compression. Don't be discouraged by my lack
>of success since your idea is significantly different that my
>word "similar" above is a debatable. The similarity however
>was that it DID search for repeated strings so that they
>could be replaced by something shorter. I don't have the
>file available at this computer but I think the search code
>was something like this:
>
>sequence source -- is the source string
>constant slen = length( source )
>integer len -- length of current segment
>sequence s -- current segment
>
>for len = 2 to floor( slen/2 ) do -- slen/2 is maximum seg length
>  for pos = 1 to slen-len do -- try every segment in the source
>    s = source[pos..pos+len] -- extract segment
>    if match( s, source[pos+len..slen] ) -- is there any more of it?
>      --this is a repeated string
>    end if
>  end for
>end for
>
>I hope this is somehow helpful as it is completely un-tested.
>
>later,
>Lewis Townsend
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu