=?Utf-8?B?bmlja2R1?= <(E-Mail Removed)> wrote in
news:69C88D65-9928-49AE-AB2F-(E-Mail Removed):
> I'm using the deflate stream to compress a file. Is there an easy
> (/fast) way for me to detect that this file has been compressed using
> the deflate stream? The reason I'm looking for this efficient method
> of checking whether a file has been compressed is that I have a
> current application which is working with uncompressed files. Ideally
> I would like to modify the application to be able to work with both
> compressed and uncompressed files.
The headers of files have information about the file. You examine the bytes
to the first null char { (char) 0 }. Every compressed file I have seen has
a header that indicates the file type. The same is true of files like
images file, etc.
Peace and Grace,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
My vacation and childhood cancer awareness site:
http://www.crazycancertour.com
*******************************************
| Think outside the box! |
*******************************************