Click here to Skip to main content
15,884,629 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to make auto-generated unit tests fail initially? Pin
Pete O'Hanlon9-Jan-12 5:29
mvePete O'Hanlon9-Jan-12 5:29 
GeneralRe: How to make auto-generated unit tests fail initially? Pin
BobJanova9-Jan-12 6:48
BobJanova9-Jan-12 6:48 
GeneralRe: How to make auto-generated unit tests fail initially? Pin
Jun Du9-Jan-12 7:45
Jun Du9-Jan-12 7:45 
GeneralRe: How to make auto-generated unit tests fail initially? Pin
BobJanova13-Jan-12 5:59
BobJanova13-Jan-12 5:59 
QuestionGZipStream appears to malfunction (24K maximum) Pin
Paladin20006-Jan-12 5:17
Paladin20006-Jan-12 5:17 
AnswerRe: GZipStream appears to malfunction (24K maximum) Pin
Luc Pattyn6-Jan-12 7:00
sitebuilderLuc Pattyn6-Jan-12 7:00 
GeneralRe: GZipStream appears to malfunction (24K maximum) Pin
Paladin20006-Jan-12 7:51
Paladin20006-Jan-12 7:51 
GeneralRe: GZipStream appears to malfunction (24K maximum) Pin
Paladin20006-Jan-12 9:02
Paladin20006-Jan-12 9:02 
Update...

The .gz appears fine; I was able to extract it using WinZip (224 MB -> 877 MB). I tested Ionic's version of GZipStream, and it also resulted in a 24K file, along with the following error message:

Destination array was not long enough. Check destIndex and length, and the array's lower bounds.

Here is the Ionic-GZipStream version (which is almost identical to the previous):

C#
/// <summary>
/// G-ZIP (.gz) Decompression method, using Ionic library.  Places new file in the same folder.
/// </summary>
/// <param name="file">File to be decompressed.</param>
private static void gDecompressIonic(FileInfo file)
{
    // Get the stream of the source file.
    using (FileStream inFile = file.OpenRead())
    {
        // Get original file extension, for example "doc" from report.doc.gz.
        string curFile = file.FullName;
        string origName = curFile.Remove(curFile.Length - file.Extension.Length);

        //Create the decompressed file.
        using (FileStream outFile = File.Create(origName))
        {
            using (Ionic.Zlib.GZipStream Decompress = new Ionic.Zlib.GZipStream(inFile, Ionic.Zlib.CompressionMode.Decompress))
            {
                //Copy the decompression stream into the output file.
                byte[] buffer = new byte[4096];
                int numRead;
                while ((numRead = Decompress.Read(buffer, 0, buffer.Length)) != 0)
                {
                    outFile.Write(buffer, 0, numRead);
                }
            }
        }
    }
}

GeneralRe: GZipStream appears to malfunction (24K maximum) Pin
jschell6-Jan-12 9:11
jschell6-Jan-12 9:11 
GeneralRe: GZipStream appears to malfunction (24K maximum) Pin
harold aptroot6-Jan-12 23:34
harold aptroot6-Jan-12 23:34 
AnswerRe: GZipStream appears to malfunction (24K maximum) Pin
Luc Pattyn8-Jan-12 18:46
sitebuilderLuc Pattyn8-Jan-12 18:46 
QuestionCompression/Decompression using C#(Only using C# APIs. no third party) Pin
KASR16-Jan-12 3:08
KASR16-Jan-12 3:08 
AnswerRe: Compression/Decompression using C#(Only using C# APIs. no third party) Pin
OriginalGriff6-Jan-12 3:48
mveOriginalGriff6-Jan-12 3:48 
GeneralRe: Compression/Decompression using C#(Only using C# APIs. no third party) Pin
KASR18-Jan-12 20:29
KASR18-Jan-12 20:29 
QuestionTest Tools Pin
Pierre besquent5-Jan-12 23:52
Pierre besquent5-Jan-12 23:52 
QuestionIEnumerable OrderBy on a text field Pin
__John_5-Jan-12 22:48
__John_5-Jan-12 22:48 
AnswerRe: IEnumerable OrderBy on a text field Pin
Wayne Gaylard5-Jan-12 23:18
professionalWayne Gaylard5-Jan-12 23:18 
AnswerRe: IEnumerable OrderBy on a text field Pin
manognya kota5-Jan-12 23:22
manognya kota5-Jan-12 23:22 
GeneralRe: IEnumerable OrderBy on a text field Pin
__John_5-Jan-12 23:46
__John_5-Jan-12 23:46 
GeneralRe: IEnumerable OrderBy on a text field Pin
__John_5-Jan-12 23:55
__John_5-Jan-12 23:55 
GeneralRe: IEnumerable OrderBy on a text field Pin
manognya kota6-Jan-12 0:36
manognya kota6-Jan-12 0:36 
GeneralRe: IEnumerable OrderBy on a text field Pin
__John_6-Jan-12 0:44
__John_6-Jan-12 0:44 
GeneralRe: IEnumerable OrderBy on a text field Pin
manognya kota6-Jan-12 0:58
manognya kota6-Jan-12 0:58 
GeneralRe: IEnumerable OrderBy on a text field Pin
manognya kota6-Jan-12 1:23
manognya kota6-Jan-12 1:23 
GeneralRe: IEnumerable OrderBy on a text field Pin
__John_6-Jan-12 1:59
__John_6-Jan-12 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.