Zip for UWP/WinRT
Create メソッド
使用例 

新しい zip ファイルを含む System.IO.Stream
新しい zip ファイルをストリームに作成します。
構文
'宣言
 
Public Sub Create( _
   ByVal stream As System.IO.Stream _
) 
public void Create( 
   System.IO.Stream stream
)

パラメータ

stream
新しい zip ファイルを含む System.IO.Stream
使用例
以下のコードは、新しい C1ZipFile をメモリストリームに作成し、それにいくつかのファイルを追加します。最後に、zip 形式で圧縮されたデータをバイト配列として取得します。これは、データベースなどに格納できます。
// ストリームに zip を作成します
MemoryStream msZip = new MemoryStream();
C1ZipFile zip = new C1ZipFile(msZip, true);

// それにいくつかのエントリを追加します
foreach (string f in Directory.GetFiles(@"c:\WINDOWS\Web\Wallpaper"))
{
zip.Entries.Add(f);
}

// zip 形式で圧縮されたデータをバイト配列として取得します
byte[] zipData = msZip.ToArray();
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

参照

関連項目

C1ZipFile クラス
C1ZipFile メンバ

Send Feedback