1

Topic: SSIS, GZipStream - not so?

Colleagues!
There were essential necessities to archive inside SSIS one file.
The task is to archive a file as though standard means of Windows (without exterior archivers of type winrar, etc.)
.
here this example: https://msdn.microsoft.com/ru-ru/librar … ompression (v=vs.100).aspx
Type a whisker works, BUT the received archive does not open in Windows.
Tried both GZipStream and DeflateStream.
Not so?

2

Re: SSIS, GZipStream - not so?

Copy your code in project VS of the console application and .
To tell that at you there not so without seeing your code it is impossible.
And questions on.net it is better in an appropriate forum.

3

Re: SSIS, GZipStream - not so?

RegisteredUser;
Look for examples of operation with Shell. Application.

4

Re: SSIS, GZipStream - not so?

wrote:

copy your code in project VS of the console application and .
To tell that at you there not so without seeing your code it is impossible.
And questions on.net it is better in an appropriate forum.

public static void Compress (FileInfo fi)
{
//Get the stream of the source file.
using (FileStream inFile = fi. OpenRead ())
{
//Prevent compressing hidden and already compressed files.
if ((File. GetAttributes (fi. FullName) AND FileAttributes. Hidden)
! = FileAttributes. Hidden AND fi. Extension! = ".zip")
{
//Create the compressed file.
using (FileStream outFile =
File. Create (fi. FullName + ".zip"))
{
using (GZipStream Compress = new GZipStream (outFile, CompressionMode. Compress))
{
inFile. CopyTo (Compress);
}
//is too does not open, though creates archive
//using (DeflateStream Compress = new DeflateStream (outFile, CompressionMode. Compress))
//{
////Copy the source file into the compression stream.
//inFile. CopyTo (Compress);
////Console. WriteLine ("Compressed {0} from {1} to {2} bytes.";
////fi. Name, fi. Length. ToString (), outFile. Length. ToString ());
//}
}
}
}
}

5

Re: SSIS, GZipStream - not so?

RegisteredUser wrote:

Colleagues!
There were essential necessities to archive inside SSIS one file.
The task is to archive a file as though standard means of Windows (without exterior archivers of type winrar, etc.)
.
here this example: https://msdn.microsoft.com/ru-ru/librar … ompression (v=vs.100).aspx
Type a whisker works, BUT the received archive does not open in Windows.
Tried both GZipStream and DeflateStream.
Not so?

It is necessary archive -  archive
System. IO.Compression. ZipArchive ($compressedStream, [System. IO.Compression. ZipArchiveMode]:: Read)