public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | |
offset | int | |
count | int | |
Résultat | int |
public static void DecompressFile(string inFile, string outFile) { var buffer = new byte[1 << 20]; using (var ins = new XZDecompressStream(inFile)) using (var outs = new FileStream(outFile, FileMode.CreateNew)) { while (true) { var cnt = ins.Read(buffer, 0, buffer.Length); outs.Write(buffer, 0, cnt); if (cnt < buffer.Length) { break; } } } }
public static void DecompressFile(string inFile, string outFile) { var buffer = new byte[1 << 20]; using (var ins = new XZDecompressStream(inFile)) using (var outs = new FileStream(outFile, FileMode.CreateNew)) { while (true) { var cnt = ins.Read(buffer, 0, buffer.Length); outs.Write(buffer, 0, cnt); if (cnt < buffer.Length) break; } } }