2
파일을 가져올 때마다 입력 스트림의 길이 (s.Length)가 항상 0입니다. 내가 뭘 잘못 했습니까? ZipEntry를 유효 및 사용 코드 IM 여기서 파일의 적절한 크기 등sharpziplib + 단일 파일 압축
를 갖는다 :
public static byte[] GetFileFromZip(string zipPath, string fileName)
{
byte[] ret = null;
ZipFile zf = new ZipFile(zipPath);
ZipEntry ze = zf.GetEntry(fileName);
if (ze != null)
{
Stream s = zf.GetInputStream(ze);
ret = new byte[s.Length];
s.Read(ret, 0, ret.Length);
}
return ret;
}
감사합니다. – schmoopy