
ZIP 파일은 크게 세 가지 주요 구조로 구성되어 있습니다:
출처: ZIP File Format - Wikipedia
기본 크기: 30바이트 (가변 필드 제외)
필드명 크기 설명
| local file header signature | 4 bytes | 0x04034b50 (고유 식별자) |
| version needed to extract | 2 bytes | 압축 해제에 필요한 최소 버전 |
| general purpose bit flag | 2 bytes | 범용 비트 플래그 |
| compression method | 2 bytes | 압축 방법 |
| last mod file time | 2 bytes | 파일 최종 수정 시간 |
| last mod file date | 2 bytes | 파일 최종 수정 날짜 |
| crc-32 | 4 bytes | CRC-32 체크섬 |
| compressed size | 4 bytes | 압축된 파일 크기 |
| uncompressed size | 4 bytes | 압축 해제된 파일 크기 |
| file name length | 2 bytes | 파일명 길이 |
| extra field length | 2 bytes | 추가 필드 길이 |
| file name | 가변 | 파일명 (UTF-8 또는 CP437 인코딩) |
| extra field | 가변 | 추가 필드 데이터 |
기본 크기: 46바이트 (가변 필드 제외)
필드명 크기 설명
| central file header signature | 4 bytes | 0x02014b50 (고유 식별자) |
| version made by | 2 bytes | 생성한 ZIP 프로그램 버전 |
| version needed to extract | 2 bytes | 압축 해제에 필요한 최소 버전 |
| general purpose bit flag | 2 bytes | 범용 비트 플래그 |
| compression method | 2 bytes | 압축 방법 |
| last mod file time | 2 bytes | 파일 최종 수정 시간 |
| last mod file date | 2 bytes | 파일 최종 수정 날짜 |
| crc-32 | 4 bytes | CRC-32 체크섬 |
| compressed size | 4 bytes | 압축된 파일 크기 |
| uncompressed size | 4 bytes | 압축 해제된 파일 크기 |
| file name length | 2 bytes | 파일명 길이 |
| extra field length | 2 bytes | 추가 필드 길이 |
| file comment length | 2 bytes | 파일 주석 길이 |
| disk number start | 2 bytes | 파일이 시작되는 디스크 번호 |
| internal file attributes | 2 bytes | 내부 파일 속성 |
| external file attributes | 4 bytes | 외부 파일 속성 |
| relative offset of local header | 4 bytes | 로컬 헤더의 상대적 오프셋 |
| file name | 가변 | 파일명 |
| extra field | 가변 | 추가 필드 데이터 |
| file comment | 가변 | 파일 주석 |
기본 크기: 22바이트 (주석 제외)
필드명 크기 설명
| end of central dir signature | 4 bytes | 0x06054b50 (고유 식별자) |
| number of this disk | 2 bytes | 현재 디스크 번호 |
| number of the disk with the start of the central directory | 2 bytes | 중앙 디렉토리가 시작되는 디스크 번호 |
| total number of entries in the central directory on this disk | 2 bytes | 현재 디스크의 중앙 디렉토리 엔트리 수 |
| total number of entries in the central directory | 2 bytes | 전체 중앙 디렉토리 엔트리 수 |
| size of the central directory | 4 bytes | 중앙 디렉토리 크기 |
| offset of start of central directory | 4 bytes | 중앙 디렉토리 시작 오프셋 |
| ZIP file comment length | 2 bytes | ZIP 파일 주석 길이 |
| ZIP file comment | 가변 | ZIP 파일 주석 |
| ZLIB 로 메모리에 압축 하기 (0) | 2021.01.06 |
|---|---|
| ZLIB 사용하여 메모리에 압축 풀기 (0) | 2021.01.06 |
| Lempel-Ziv 알고리즘 (0) | 2018.09.04 |
| GZIP 구조 (0) | 2017.10.14 |
| Run Length Encoding(1) (0) | 2017.10.14 |
댓글 영역