From: Tim Wescott on 3 Apr 2010 19:05 Luna Moon wrote: > Hi all, > > I have a vector of real numbers in Matlab. How do I compress them? Of > course this has to be lossless, since I need to be able to recover > them. > > The goal is to study the Shannon rate and entropy of these real > numbers, so I decide to compress them and see how much compression > ratio I can have. > > I don't need to write the result into compressed files, so those > headers, etc. are just overhead for me which affect me calculating the > Entropy... so I just need a bare version of the compress ratio... > > Any pointers? Find another approach to getting an answer, maybe. First, most lossless compression algorithms are designed for things like text, executables, and data bases -- they don't do well with floating point numbers, tending to see them as "random" even when they're not. Second, if you measure a bunch of meaningless white noise and put the result into floating point numbers, then put them into a lossless algorithm that _can_ handle floating point, it's not going to compress at all, because the algorithm can't distinguish between white noise and a signal that's chock-full of information. In effect you'll have _given_ it a signal full of information, in great detail, about the noise. I think you're leading yourself down the garden path. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
From: John on 3 Apr 2010 19:13 On Apr 2, 9:19 pm, "Michael Plante" <michael.plante(a)n_o_s_p_a_m.gmail.com> wrote: > Michael wrote: > >John wrote: > >>On Apr 2, 3:50=A0pm, Luna Moon <lunamoonm...(a)gmail.com> wrote: > >>> Hi all, > > >>> I have a vector of real numbers in Matlab. How do I compress them? > >=A0Of > >>> course this has to be lossless, since I need to be able to recover > >>> them. > > >>> The goal is to study the Shannon rate and entropy of these real > >>> numbers, so I decide to compress them and see how much compression > >>> ratio I can have. > > >>> I don't need to write the result into compressed files, so those > >>> headers, etc. are just overhead for me which affect me calculating the > >>> Entropy... so I just need a bare version of the compress ratio... > > >>> Any pointers? > > >>> Thanks a lot! > > >>Consider the array of numbers in binary form. Rearrange the bits so > >>all the ones are sequential, and do the same for the zeros. The number > >>of ones followed by the number of zeros is your compressed file. > > >That's hardly optimal (effectively Run-Length Encoding (RLE)), and will, > in > >general, result in a falsely high estimate of "information content". How > >many PCX images do you see floating around? > > Sorry, I should have said "it's throwing away information, and then RLE". > So it's going to give nonsense. Nobody in here has a sense of humor
From: robert bristow-johnson on 4 Apr 2010 00:52 On Apr 3, 7:13 pm, John <sampson...(a)gmail.com> wrote: > Nobody in here has a sense of humor i got it. your file compression scheme sorta rearranged the order of data. but yer right. no sense of humor to be found here. r b-j
From: Vladimir Vassilevsky on 4 Apr 2010 01:51 robert bristow-johnson wrote: > On Apr 3, 7:13 pm, John <sampson...(a)gmail.com> wrote: > > >>Nobody in here has a sense of humor > > > i got it. your file compression scheme sorta rearranged the order of > data. > > but yer right. no sense of humor to be found here. JFYI: http://en.wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transform Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
From: John on 4 Apr 2010 07:51 On Apr 4, 12:52 am, robert bristow-johnson <r...(a)audioimagination.com> wrote: > On Apr 3, 7:13 pm, John <sampson...(a)gmail.com> wrote: > > > Nobody in here has a sense of humor > > i got it. your file compression scheme sorta rearranged the order of > data. > > but yer right. no sense of humor to be found here. > > r b-j I was one day too late.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: upsampling question Next: Decode 1394 data to 4 I2S audio data |