[Flac-dev] Win32 and ELF created files are different

Brian Willoughby brianw at sounds.wa.com
Tue Feb 9 16:01:00 PST 2010

On Feb 9, 2010, at 14:10, Djeizon Barros wrote:
> I was fiddling with FLAC executable on Linux and also making FLAC  
> files with foobar2000 under WINE. I was using the same exact  
> options for both linux native executable and flac.exe through  
> foobar2000. But I have noticed something: The FLAC files themselves  
> created from flac.exe and flac(ELF) are not bit identical. They  
> differ in something (Not audio data).
> Looking at this, I used a Windows native installation to check  
> about this and confirmed that the flac.exe in Windows is also  
> creating a file that differs a little than the flac ELF. At first  
> glance I compared the metadata and it seemed that metaflac returned  
> different stream_offsets from the seektable, comparing the same  
> music file created with flac-win and flac-lin. Then I removed  
> entirely both their tags & padding, but they still are different.
> Is this normal? Music data is absolutely untouched, however, can  
> this be an architecture difference between the compilers that made  
> the Win32 and ELF executables? Just for the record, what is exactly  
> making the files different?

FLAC is guaranteed to be lossless, in that you get back your original  
data.  You also have the option of several different levels of  
compression, from 1 to 9.  Each level produces a different FLAC file,  
but all are lossless and get back your original data.  Most  
importantly, every decoder is guaranteed to produce the original data  
no matter which encoder was used.  However, there is no guarantee  
that every version of FLAC will produce the same compressed data at  
the same compression level.  So long as you get back your original  
data at every possible compression level, you shouldn't really care  
about the details of the compressed data.

At least this is my understanding of the technology.  Amazing, isn't it!

Brian Willoughby
Sound Consulting

More information about the Flac-dev mailing list