<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: How to check if a file is compressed in C#</title>
	<atom:link href="http://blog.somecreativity.com/2008/04/08/how-to-check-if-a-file-is-compressed-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.somecreativity.com/2008/04/08/how-to-check-if-a-file-is-compressed-in-c/</link>
	<description>Weblog of Siddharth Uppal</description>
	<lastBuildDate>Sun, 21 Feb 2010 10:50:19 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sid</title>
		<link>http://blog.somecreativity.com/2008/04/08/how-to-check-if-a-file-is-compressed-in-c/#comment-4705</link>
		<dc:creator>Sid</dc:creator>
		<pubDate>Tue, 30 Sep 2008 00:17:12 +0000</pubDate>
		<guid isPermaLink="false">http://siddhu.wordpress.com/?p=466#comment-4705</guid>
		<description>It seems you&#039;re attempting to use this code in an ASP.NET app. Make sure your ASP.NET account has adequate permissions to write to the location where you&#039;re attempting to save the received file.</description>
		<content:encoded><![CDATA[<p>It seems you&#8217;re attempting to use this code in an ASP.NET app. Make sure your ASP.NET account has adequate permissions to write to the location where you&#8217;re attempting to save the received file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dnzsahin</title>
		<link>http://blog.somecreativity.com/2008/04/08/how-to-check-if-a-file-is-compressed-in-c/#comment-4704</link>
		<dc:creator>dnzsahin</dc:creator>
		<pubDate>Tue, 16 Sep 2008 11:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://siddhu.wordpress.com/?p=466#comment-4704</guid>
		<description>hi,

I have cange this to
///////////////////////////////////////////////////////////////////
    public string CheckSignature(Stream fs, int signatureSize)
    {
        StreamReader Reader = new StreamReader(fs);
        using (fs)
        {
            if (fs.Length  0)
            {
                int bytesRead = fs.Read(signature, index, signatureSize);
                signatureSize -= bytesRead;
                index += bytesRead;
            }
            fs.Dispose();

            return BitConverter.ToString(signature);
        }
    }
///////////////////////////////////////////////////////
and  i call CheckSignature as

if (CheckSignature(MyUploadedFile.PostedFile.InputStream, 4) == &quot;89-50-4E-47&quot;)
{
// save MyPostedFile to directory
}

when i send a jpeg file 
if (CheckSignature(MyUploadedFile.PostedFile.InputStream, 4) == &quot;89-50-4E-47&quot;) is true

my question is..

why i can&#039;t save MyPostedFile</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>I have cange this to<br />
///////////////////////////////////////////////////////////////////<br />
    public string CheckSignature(Stream fs, int signatureSize)<br />
    {<br />
        StreamReader Reader = new StreamReader(fs);<br />
        using (fs)<br />
        {<br />
            if (fs.Length  0)<br />
            {<br />
                int bytesRead = fs.Read(signature, index, signatureSize);<br />
                signatureSize -= bytesRead;<br />
                index += bytesRead;<br />
            }<br />
            fs.Dispose();</p>
<p>            return BitConverter.ToString(signature);<br />
        }<br />
    }<br />
///////////////////////////////////////////////////////<br />
and  i call CheckSignature as</p>
<p>if (CheckSignature(MyUploadedFile.PostedFile.InputStream, 4) == &#8220;89-50-4E-47&#8243;)<br />
{<br />
// save MyPostedFile to directory<br />
}</p>
<p>when i send a jpeg file<br />
if (CheckSignature(MyUploadedFile.PostedFile.InputStream, 4) == &#8220;89-50-4E-47&#8243;) is true</p>
<p>my question is..</p>
<p>why i can&#8217;t save MyPostedFile</p>
]]></content:encoded>
	</item>
</channel>
</rss>
