madplay / madplay.github.io

오늘도 MadPlay!
https://madplay.github.io
MIT License
18 stars 2 forks source link

자바 파일 압축과 압축 해제(ZipInputStream, ZipOutputStream) #134

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

자바 파일 압축과 압축 해제(ZipInputStream, ZipOutputStream)

java.util.zip 패키지를 이용한 자바 파일 압축과 압축 해제

https://madplay.github.io/post/java-file-zip

aaboo commented 3 years ago

예제 감사합니다.

저의 경우 "파일 압축 예제"를 테스트 해보니 압축한 zip 파일이 1K로만 나와서, 아래처럼 수정하니 해결되었습니다.

while (((length = fileInputStream.read(buf)) > 0)) {