# hwpx flate 관련해서 문의 드립니다

**URL:** <https://forum.developer.hancom.com/t/hwpx-flate/256>\
**Category:** 한글 컨트롤\
**Created:** [10월 21, 2021, 9:21오전 UTC](https://forum.developer.hancom.com/t/hwpx-flate/256 "2021-10-21T09:21:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev.community](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.developer.hancom.com/dev.community/32/488_2.png) [@dev.community](https://forum.developer.hancom.com/u/dev.community)\
**Post date:** [10월 21, 2021, 9:21오전 UTC](https://forum.developer.hancom.com/t/hwpx-flate/256/1 "2021-10-21T09:21:30Z")

</div>

_(예전 커뮤니티(2016-2020) 사이트에서 옮겨온 글입니다: [번호 219](https://www.hancom.com/board/devcommView.do?board_seq=48&artcl_seq=10957))_

작성자: tjd1517  
날짜: 2021-08-02

* * *

hwpx 문서가 OCF컨테이너로 되어있다고 나와있는데, OCF\_2.0.1 draft 문서를 보시면

When stored in a ZIP container, streams of data MUST be compressed before they are encrypted;

Flate compression MUST be used. Within the ZIP directory, encrypted files SHOULD be stored rather than Flate-compressed.

이렇게 ZIP container 안에 들어가는 파일은 암호화 하기 전에 flate-compress를 한다고 합니다.

근데 이 flate-compress가 zlib를 이용해서 압축을 한다는 건가요?

zlib를 이용한다면 데이터에 붙여야 할 header랑 footer는 어떻게 되는지...

아니라면 관련된 라이브러리를 좀 알 수 있을까요?

hwpx python으로 읽어올 수 있도록 소스짜고 있는데, 복호화때문에 골치가 썩네요...

#### 댓글

##### tjd1517 (2021.08.10)

해결했습니다~
