Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Can I compress 45Bytes to 37Bytes?
hi,
I am want to compress data frames 45Bytes/Per frame to 37Bytes. the
sample printed out data is
" 4B63401F804FDF86CEE761DA46F55C91ACE445D9
88B4DBF8C9F7E27D355DE4851E0BBF3E3D9
8EF3D705B75208501"(46Bytes).
I have tried some source code provide by internet with          LZ77
coding
LZ78 coding
LZW coding
RLE coding
but all of them gernerate a data frame bigger than 46Bytes. I am very
frustrated.

can anybody give me some advice. I am considering flow compress. i.e
compress in this side and decompress the other side just like online
movie. will it possible? as I know we can not distinct the two frames
after compressing.


thanks.


Report this thread to moderator Post Follow-up to this message
Old Post
arniewang@yahoo.com.cn
04-15-05 08:55 PM


Re: Can I compress 45Bytes to 37Bytes?
arniewang@yahoo.com.cn wrote:

> hi,
>    I am want to compress data frames 45Bytes/Per frame to 37Bytes. the
> sample printed out data is
> " 4B63401F804FDF86CEE761DA46F55C91ACE445D9
88B4DBF8C9F7E27D355DE4851E0BBF3E3
D98EF3D705B75208501"(46Bytes).
>    I have tried some source code provide by internet with          LZ77
> coding
>        LZ78 coding
>       LZW coding
>      RLE coding
> but all of them gernerate a data frame bigger than 46Bytes. I am very
> frustrated.

What created this frame of data? If it is already compressed, then it is not
likely you will be able to compress it any further.

> can anybody give me some advice. I am considering flow compress. i.e
> compress in this side and decompress the other side just like online
> movie. will it possible? as I know we can not distinct the two frames
> after compressing.
>
>
> thanks.

--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com


Report this thread to moderator Post Follow-up to this message
Old Post
Phil Frisbie, Jr.
04-15-05 08:55 PM


Re: Can I compress 45Bytes to 37Bytes?
arniewang@yahoo.com.cn wrote in
news:1113578223.760970.163240@f14g2000cwb.googlegroups.com:

> hi,
>    I am want to compress data frames 45Bytes/Per frame to 37Bytes. the
> sample printed out data is
> " 4B63401F804FDF86CEE761DA46F55C91ACE445D9
88B4DBF8C9F7E27D355DE4851E0BBF
> 3E3D98EF3D705B75208501"(46Bytes).
>    I have tried some source code provide by internet with
>    LZ77
> coding
>        LZ78 coding
>       LZW coding
>      RLE coding
> but all of them gernerate a data frame bigger than 46Bytes. I am very
> frustrated.
>
> can anybody give me some advice. I am considering flow compress. i.e
> compress in this side and decompress the other side just like online
> movie. will it possible? as I know we can not distinct the two frames
> after compressing.
>
>
> thanks.
>
>

I am not sure exactly what your porblem is. Do you need exatly 37 bytes.
what if some are 40 and some 34.  Secondly to compress just 46 bytes to
37 you need to know more about the data it may or may not be possible.

Also you claimed you used LZW did you try my version. If you used source
off the net many compressors made for long files and you may need to mod
them to shorten or remove wasted parts of the headers.


David A. Scott
--
My Crypto code
http://bijective.dogma.net/crypto/scott19u.zip
http://www.jim.com/jamesd/Kong/scott19u.zip old version
My Compression code http://bijective.dogma.net/
**TO EMAIL ME drop the roman "five" **
Disclaimer:I am in no way responsible for any of the statements
made in the above text. For all I know I might be drugged.
As a famous person once said "any cryptograhic
system is only as strong as its weakest link"


Report this thread to moderator Post Follow-up to this message
Old Post
David A. Scott
04-16-05 01:55 AM


Re: Can I compress 45Bytes to 37Bytes?
In fact I use bit to arrange data in it, there are about 37Bytes
contain the actuall data (maybe compressed). the other 9Bytes is
arranged by us bit by bit. so I think it is not easy to compress.
can I treat many frame sequencyly and send out one frame one time,
maybe this better than treat only one frame.


Report this thread to moderator Post Follow-up to this message
Old Post
arniewang@yahoo.com.cn
04-16-05 08:55 AM


Re: Can I compress 45Bytes to 37Bytes?
Scott:
I have try some sample from you websites
ah3
arb3w
arb255
arbsha1
arbsha2
bibwt1
bwtdsc
bwtrle
fin2in
lzw1
lzw3s
vh
ah2
ah1
ah2a
ah2af
except some exes must use conditional files that I have not try , but
none can compress my binary data.

the sample way to compress is:
CHAR*
pchInput=" 4B63401F804FDF86CEE761DA46F55C91ACE445D9
88B4DBF8C9F7E27D355DE4851E
0BBF3E3D98EF3D705B75208501";
/* 92  chars mean 46 byte data */
BYTE         lpBufSrc[PCUDATALEN];
BYTE         lpBufDest[2*PCUDATALEN];
DWORD	    dwOrgLen=PCUDATALEN;
DWORD	    pdwEncLen=2*PCUDATALEN;
DWORD       dwMaxLen=2*PCUDATALEN;
int          i;
for (i=0;i<PCUDATALEN;i++)
{
sscanf(pchInput, "%2x", &lpBufSrc[i]);
pchInput+=2;
}

RunLengthEncode (	lpBufSrc,dwOrgLen,
lpBufDest,&pdwEncLen,dwMaxLen    );


Report this thread to moderator Post Follow-up to this message
Old Post
arniewang
04-16-05 08:55 AM


Re: Can I compress 45Bytes to 37Bytes?
sourc code to test my bin data:
CHAR*
pchInput=" 4B63401F804FDF86CEE761DA46F55C91ACE445D9
88B4DBF8C9F7E27D355DE4851E
0BBF3E3D98EF3D705B75208501";
BYTE         lpBufSrc[PCUDATALEN];
BYTE         lpBufDest[2*PCUDATALEN];
DWORD	    dwOrgLen=PCUDATALEN;
DWORD	    pdwEncLen=2*PCUDATALEN;
DWORD       dwMaxLen=2*PCUDATALEN;
int          i;
for (i=0;i<PCUDATALEN;i++)
{
sscanf(pchInput, "%2x", &lpBufSrc[i]);
pchInput+=2;
}

RunLengthEncode (	lpBufSrc,dwOrgLen,
lpBufDest,&pdwEncLen,dwMaxLen    );


Report this thread to moderator Post Follow-up to this message
Old Post
arniewang
04-16-05 08:55 AM


Re: Can I compress 45Bytes to 37Bytes?
<arniewang@yahoo.com.cn> schrieb
>   I am want to compress data frames 45Bytes/Per frame to 37Bytes. the
> sample printed out data is
> " 4B63401F804FDF86CEE761DA46F55C91ACE445D9
 88B4DBF8C9F7E27D355DE4851E0BBF3E3D98EF3D
7
05B75208501"(46Bytes).

Must the compressed data a ASCII representation as well?
Your data can be easily compressed to a 8bit binary chunk because your data
range of the input data is fixed (A-Z 0-9). You have 36 symbols and if you
would use 6bits for them (trivial case) for your input symbols, you end up
with 34 Bytes by simply stuffing the bits. Using a compression scheme can
get you further down, but it really depends on your needs.




Report this thread to moderator Post Follow-up to this message
Old Post
Jürgen Eidt
04-16-05 08:55 AM


Re: Can I compress 45Bytes to 37Bytes?
arniewang@yahoo.com.cn wrote:
> hi,
>    I am want to compress data frames 45Bytes/Per frame to 37Bytes.
the
> sample printed out data is
>
" 4B63401F804FDF86CEE761DA46F55C91ACE445D9
 88B4DBF8C9F7E27D355DE4851E0BBF3E3D98EF3D
705B752085
01"(46Bytes).
>    I have tried some source code provide by internet with
LZ77
> coding
>        LZ78 coding
>       LZW coding
>      RLE coding
> but all of them gernerate a data frame bigger than 46Bytes. I am very
> frustrated.
>
> can anybody give me some advice. I am considering flow compress. i.e
> compress in this side and decompress the other side just like online
> movie. will it possible? as I know we can not distinct the two frames
> after compressing.
>
>
> thanks.

Wether it works or not is dependant on wether your frames contain 45 or
37 Bytes of actual information. Put another way, can your frames be one
of ANY possible combinations of 45 Bytes, or can you rule some
combinations out? In the former case compression is impossible. In the
second one, the rate of compression is a function of the amount of
combinations that can be ruled out.

Regards


Report this thread to moderator Post Follow-up to this message
Old Post
guenther vonKnakspott
04-16-05 01:55 PM


Re: Can I compress 45Bytes to 37Bytes?
I convert the byte to string for print out. so every two char equal
mens a Hex value of byte .   I think there exisit possible in the this
string.


Report this thread to moderator Post Follow-up to this message
Old Post
arniewang
04-16-05 01:55 PM


Re: Can I compress 45Bytes to 37Bytes?
every two chars stand for one hex byte value.
at current stage any compress method I found in internet can not work
at all.

by the scott I do not know how to use fin2in to compress things.


Report this thread to moderator Post Follow-up to this message
Old Post
arniewang
04-16-05 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Pages (3): [1] 2 3 »
Search this forum -> 
Post New Thread

Compression archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:20 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.