### Install hwp.js Library Source: https://github.com/hahnlee/hwp.js/blob/main/README.md Instructions for installing the hwp.js library using common Node.js package managers, npm and yarn. This makes the library available for use in JavaScript or TypeScript projects. ```Shell npm install hwp.js yarn add hwp.js ``` -------------------------------- ### HWP FileHeader Stream Structure Definition Source: https://github.com/hahnlee/hwp.js/blob/main/docs/hwp/5.0/FileHeader.md Defines the byte-level structure and interpretation of the FileHeader stream found in HWP (Hangul Word Processor) document files. This header contains critical metadata such as file signature, version, and various properties indicating document characteristics like compression, encryption, and security features. ```APIDOC FileHeader Stream Data Structure: | Data Type | Length (Bytes) | Description | |---------------------|----------------|----------------------------------------------| | BYTE array[32] | 32 | signature | | DWORD | 4 | File Version | | DWORD | 4 | Property 1 | | DWORD | 4 | Property 2 | | DWORD | 4 | EncryptVersion | | BYTE | 1 | KOGL (Public Nuri) License Support Country | | BYTE array[207] | 207 | Reserved | | Total Length | 256 | | signature: - Value: "HWP Document File" File Version (0xMMnnPPrr format, e.g., 5.0.3.0): - MM: Indicates major structural changes, incompatible with older versions. - nn: Indicates significant structural changes, incompatible with older versions. - PP: Indicates structural additions (new Records), compatible with older versions. - rr: Indicates information additions to Records, compatible with older versions. Property 1 (Bitwise Flags): - bit 0: Compression status - bit 1: Encryption setting status - bit 2: Distribution document status - bit 3: Script saving status - bit 4: DRM security document status - bit 5: XMLTemplate storage existence - bit 6: Document history management existence - bit 7: Electronic signature information existence - bit 8: Public certificate encryption status - bit 9: Electronic signature preliminary saving status - bit 10: Public certificate DRM security document status - bit 11: CCL document status - bit 12: Mobile optimization status - bit 13: Personal information security document status - bit 14: Change tracking document status - bit 15: KOGL (Public Nuri) copyright document - bit 16: Video control inclusion status - bit 17: Table of contents field control inclusion status - bit 18 ~ 31: Reserved Property 2 (Bitwise Flags): - bit 0: CCL, KOGL license information - bit 1: Copy restriction status - bit 2: Permission to copy under same conditions (ignored if copy restricted) - bit 3 ~ 31: Reserved EncryptVersion: - 0: None - 1: (Hangeul 2.5 or earlier) - 2: (Hangeul 3.0 Enhanced) - 3: (Hangeul 3.0 Old) - 4: (Hangeul 7.0 or later) KOGL (Public Nuri) License Support Country: - 6: KOR (Korea) - 15: US (United States) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.