KR20090068787A - Method and apparatus for file compression and restoration of compression format - Google Patents

Method and apparatus for file compression and restoration of compression format Download PDF

Info

Publication number
KR20090068787A
KR20090068787A KR1020070136546A KR20070136546A KR20090068787A KR 20090068787 A KR20090068787 A KR 20090068787A KR 1020070136546 A KR1020070136546 A KR 1020070136546A KR 20070136546 A KR20070136546 A KR 20070136546A KR 20090068787 A KR20090068787 A KR 20090068787A
Authority
KR
South Korea
Prior art keywords
file
compression
information
compressed
target
Prior art date
Application number
KR1020070136546A
Other languages
Korean (ko)
Other versions
KR100938277B1 (en
Inventor
정상원
신제훈
Original Assignee
(주)이스트소프트
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by (주)이스트소프트 filed Critical (주)이스트소프트
Priority to KR1020070136546A priority Critical patent/KR100938277B1/en
Publication of KR20090068787A publication Critical patent/KR20090068787A/en
Application granted granted Critical
Publication of KR100938277B1 publication Critical patent/KR100938277B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/70Type of the data to be coded, other than image and sound
    • H03M7/705Unicode

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

A method and an apparatus for compressing and restoring a file of a compression format are provided to restore a compression file name by using code page information stored in a compression file, thereby correctly restoring the compression file name by using code page information stored in the compression file. A compression target file or a compression target folder is selected(S320). If a file header of a compression file format does not support an extension header, an information file including compression information having code page information is generated(S360). The information file is added to a compression target file list(S370). The compression target file list is compressed to generate a compression file(S380).

Description

압축포맷의 파일 압축과 복원 장치 및 방법{Method and apparatus for file compression and restoration of compression format}Method and apparatus for file compression and restoration of compression format

본 발명은 압축파일에 관한 것으로, 보다 상세하게는 유니코드를 지원하지 않는 압축포맷의 파일 압축과 복원 장치 및 방법에 관한 것이다.The present invention relates to a compressed file, and more particularly, to an apparatus and method for compressing and restoring a file in a compressed format that does not support Unicode.

유니코드(Unicode)는 국제표준으로 제작된 2바이트계의 만국 공통의 국제 문자부호 체계(UCS: Universal Code System)로서, 컴퓨터에서 세계 각국의 언어를 통일된 방법으로 표현할 수 있게 제안된 국제적인 문자 코드 규약이다. 즉, 세계 각국은 동일하거나 비슷한 의미의 문자를 저마다 다른 인코딩 방식을 사용하여 표현하기 때문에, 자료 및 프로그램의 호환성 및 확장성에 문제를 일으키므로 이를 하나의 문자 세트로 통합시켜 표현함으로써 해결하자는 취지에서 전세계 주요 컴퓨터회사들이 업계표준으로 규정한 만국 공통 문자코드이다.Unicode is a two-byte universal universal code system (UCS) designed to be an international standard. It is an international character code that has been proposed to represent languages around the world in a unified way on computers. It is a convention. In other words, since countries around the world represent characters with the same or similar meanings by using different encoding schemes, they cause problems in compatibility and extensibility of materials and programs. Therefore, they are solved by integrating them into one character set. It is a universal character code defined by major computer companies as an industry standard.

'Zip'을 비롯한 대부분의 압축포맷은 유니코드를 지원하지 않는다. 유니코드를 지원하지 않는 압축포맷에 다국어로 된 파일명을 압축하여 저장할 경우, 압축파일 생성 시 운영체제의 기본 언어에 해당되는 코드페이지(Codepage)로 저장되게 된다. 코드페이지는 0부터 255까지의 정수를 표현하는 일련의 비트들이 특정한 문자와 결합하여 도표화하는데 쓰이는 특정한 문자 인코딩(encoding) 테이블을 위해 쓰인 것이다.Most compression formats, including 'Zip', do not support Unicode. If a multi-language file name is compressed and stored in a compression format that does not support Unicode, the compressed file is stored as a codepage corresponding to the default language of the operating system. The code page is used for a specific character encoding table, where a series of bits representing integers from 0 to 255 are used to tabulate in combination with a particular character.

압축파일 생성 시 운영체제의 코드페이지와 동일한 코드페이지를 사용하는 운영체제에서 압축복원을 할 경우 정상적인 파일명을 반환받을 수 있지만, 그렇지 못한 경우에는 코드페이지 간 차이에 의하여 변환할 수 없는 글자들이 "?"와 같은 형태로 치환되게 된다.When creating a compressed file, if you restore the compressed file in the operating system using the same code page as the operating system's code page, the normal file name may be returned. Otherwise, the characters that cannot be converted due to the difference between the code pages are marked with "?". The same form will be substituted.

"?, |, /,", :, <, >, *"와 같이 몇 종류의 특수문자가 포함된 파일명은 파일 생성이 불가하다.File names that contain some special characters, such as "?, |, /,",:, <,>, * ", Cannot be created.

종래에는 변형 후 치환되는 "?"문자로 인해 파일 생성이 불가한 상황을 해결하고자 "?"를 "_"와 같은 문자열로 치환하여 일부 손실된 파일명으로 압축복원 하거나, 포맷의 변형을 통하여 압축시에 유니코드 형태의 파일명을 첨부하여 압축하는 방법을 사용하였다. 하지만 후자의 경우 유니코드가 한 글자를 2바이트(Byte)로 나타내며, 파일목록 부분은 압축이 되지 않는다는 사실을 감안할 때 다소 많은 용량의 손해를 감수해야 했다. 또한 일련의 동일 제품군을 통하여 압축과 압축복원을 하지 않는다면 목적을 달성할 수 없었다.Conventionally, in order to solve the situation where a file cannot be created due to the "?" Character replaced after the conversion, the "?" Is replaced with a string such as "_" to compress and restore a part of the missing file name or to compress the file through a format change. We used the method of compressing by attaching a file name in Unicode format. In the latter case, however, Unicode represented one character as two bytes, and the file list part was not compressed. In addition, the goal could not be achieved without compression and restoration through a series of identical products.

즉 유니코드를 지원하지 않는 압축포맷의 경우 압축파일 생성 시 운영체제의 코드페이지를 알지 못하면 원래 문자열을 알아낼 수 없다. In other words, in the case of a compression format that does not support Unicode, the original string cannot be found unless the operating system code page is known when the compressed file is created.

예를 들어 일본 컴퓨터 환경 운영체제에서 일본어로 압축대상파일을 작성한 뒤 압축하면 파일 압축 및 복원 장치는 압축파일명을 일본 컴퓨터 환경 운영체제의 코드페이지를 통하여 유니코드로 치환한다.For example, if a compressed target file is created in Japanese and compressed in a Japanese computer environment operating system, the file compression and decompression device replaces the compressed file name with Unicode through the code page of the Japanese computer environment operating system.

이 압축파일을 한국 컴퓨터 환경 운영체제에서 복원 시, 한국 컴퓨터 환경 운영체제의 코드페이지를 통하여 유니코드에 해당하는 한글로 치환된다.When the compressed file is restored in the Korean computer environment operating system, it is replaced with Korean corresponding to Unicode through the code page of the Korean computer environment operating system.

즉, 일본 컴퓨터 환경 운영체제의 코드페이지를 통하여 치환된 유니코드가 한국 컴퓨터 환경 운영체제의 코드페이지를 통하여 치환되면 알 수 없는 문자로 바뀔 수 있다.That is, when the Unicode substituted through the code page of the Japanese computer environment operating system is replaced by the code page of the Korean computer environment operating system, it may be changed into an unknown character.

본 발명은 상기한 문제점을 개선하기 위해 고안된 것으로, 본 발명은 유니코드를 지원하지 않는 압축 포맷의 경우에도 파일압축과 복원이 올바로 수행되도록 하는 것을 목적으로 하고 있다. The present invention is designed to solve the above problems, and an object of the present invention is to ensure that file compression and restoration are correctly performed even in a compression format that does not support Unicode.

본 발명의 목적들은 이상에서 언급한 목적들로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The objects of the present invention are not limited to the above-mentioned objects, and other objects that are not mentioned will be clearly understood by those skilled in the art from the following description.

상기 목적을 달성하기 위하여, 본 발명의 실시예에 따른 유니코드를 지원하지 않는 압축포맷의 파일 압축과 복원 방법은, 압축대상파일을 선택하는 단계, 상 기 선택된 압축대상파일의 압축 정보를 저장하는 단계 및 상기 압축대상파일 및 상기 압축 정보를 포함하는 소정의 포맷으로 압축 파일을 생성하는 단계를 포함한다.In order to achieve the above object, the file compression and decompression method of a compression format that does not support Unicode according to an embodiment of the present invention, selecting a compression target file, storing the compression information of the selected compression target file And generating a compressed file in a predetermined format including the compressed target file and the compressed information.

본 발명의 실시예에 따른 유니코드를 지원하지 않는 압축포맷의 파일 압축과 복원 장치는 선택된 압축대상파일의 압축 정보를 저장하는 저장 모듈, 상기 압축대상파일 및 상기 압축 정보를 포함하는 포맷으로 압축 파일을 생성하는 압축파일 생성 모듈을 포함한다. An apparatus for compressing and restoring a file in a compression format that does not support Unicode according to an embodiment of the present invention includes a storage module for storing compression information of a selected compression target file, a compression file in a format including the compression target file, and the compression information. It includes a compressed file generation module for generating a.

기타 실시예들의 구체적인 사항들은 상세한 설명 및 도면들에 포함되어 있다.Specific details of other embodiments are included in the detailed description and the drawings.

이상에서 상술한 바와 같이, 본 발명에 따라 유니코드를 지원하지 않는 압축포맷의 파일 압축과 복원 장치 및 방법은 다음과 같은 효과가 있다.As described above, the file compression and decompression device and method of the compression format which does not support Unicode according to the present invention have the following effects.

압축파일 생성 시 파일을 압축한 운영체제와 다른 언어 환경의 운영체제에서 압축파일을 복원함에 있어서, 압축파일 생성 시 운영체제의 코드페이지 정보를 추출하여 압축파일에 저장하고, 압축파일 복원 시 압축파일에 저장된 코드페이지 정보를 이용하여 압축파일명을 복원함으로써, 서로 다른 운영체제의 코드페이지에서 파일 압축과 복원 시 압축파일명이 올바로 복구되는 장점이 있다.When restoring a compressed file in an operating system of a language other than the operating system that compresses the file when creating the compressed file, extracting the code page information of the operating system when creating the compressed file and storing it in the compressed file, and the code stored in the compressed file when the compressed file is restored By restoring the compressed file name using the page information, there is an advantage that the compressed file name is correctly restored when the file is compressed and restored in the code pages of different operating systems.

압축파일 생성 시 운영체제의 코드페이지 정보를 압축파일 포맷의 확장 헤더를 이용하여 저장하는 경우, 기존의 압축파일 포맷을 수정하지 않고 압축파일명을 올바로 복원시킬 수 있다.When code page information of the operating system is stored using the extension header of the compressed file format when the compressed file is generated, the compressed file name can be correctly restored without modifying the existing compressed file format.

또한, 본 발명에 따라 유니코드를 지원하지 않는 압축포맷의 파일 압축과 복 원 장치 및 방법에 따르면, 본 발명에 의하지 아니한 압축장치로 생성된 압축파일 복원 시, 사용자로 하여금 직접 복원 시 압축파일의 코드페이지를 선택할 수 있게 함으로써 본 발명에 의하지 아니한 압축파일에 대해서도 압축파일 복원 시 운영체제에서 압축파일명을 올바르게 복원할 수 있는 장점이 있다.In addition, according to the present invention, a compression and restoration method of a file that does not support Unicode, and a method and method for restoring a compressed file generated by a compression device not according to the present invention, By allowing the code page to be selected, there is an advantage in that the compressed file name can be correctly restored by the operating system when the compressed file is restored even for the compressed file not according to the present invention.

기타 실시예들의 구체적인 사항들은 상세한 설명 및 도면들에 포함되어 있다.Specific details of other embodiments are included in the detailed description and the drawings.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다 Advantages and features of the present invention and methods for achieving them will be apparent with reference to the embodiments described below in detail with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but can be implemented in various different forms, and only the embodiments make the disclosure of the present invention complete, and the general knowledge in the art to which the present invention belongs. It is provided to fully inform the person having the scope of the invention, which is defined only by the scope of the claims. Like reference numerals refer to like elements throughout.

이때, 처리 흐름도 도면들의 각 블록과 흐름도 도면들의 조합들은 컴퓨터 프로그램 인스트럭션들에 의해 수행될 수 있음을 이해할 수 있을 것이다. 이들 컴퓨터 프로그램 인스트럭션들은 범용 컴퓨터, 특수용 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서에 탑재될 수 있으므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서를 통해 수행되는 그 인스트럭션들이 흐름도 블록(들)에서 설명된 기능들을 수행하는 수단을 생성하게 된다. 이들 컴 퓨터 프로그램 인스트럭션들은 특정 방식으로 기능을 구현하기 위해 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 지향할 수 있는 컴퓨터 이용 가능 또는 컴퓨터 판독 가능 메모리에 저장되는 것도 가능하므로, 그 컴퓨터 이용가능 또는 컴퓨터 판독 가능 메모리에 저장된 인스트럭션들은 흐름도 블록(들)에서 설명된 기능을 수행하는 인스트럭션 수단을 내포하는 제조 품목을 생산하는 것도 가능하다. 컴퓨터 프로그램 인스트럭션들은 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에 탑재되는 것도 가능하므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에서 일련의 동작 단계들이 수행되어 컴퓨터로 실행되는 프로세스를 생성해서 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 수행하는 인스트럭션들은 흐름도 블록(들)에서 설명된 기능들을 실행하기 위한 단계들을 제공하는 것도 가능하다.At this point, it will be appreciated that each block of the flowchart illustrations and combinations of flowchart illustrations may be performed by computer program instructions. Since these computer program instructions may be mounted on a processor of a general purpose computer, special purpose computer, or other programmable data processing equipment, those instructions executed through the processor of the computer or other programmable data processing equipment may be described in flow chart block (s). It creates a means to perform the functions. These computer program instructions may also be stored in a computer usable or computer readable memory that can be directed to a computer or other programmable data processing equipment to implement functionality in a particular manner, thereby making the computer available or computer readable. It is also possible for the instructions stored in the memory to produce an article of manufacture containing instruction means for performing the functions described in the flowchart block (s). Computer program instructions may also be mounted on a computer or other programmable data processing equipment, such that a series of operating steps may be performed on the computer or other programmable data processing equipment to create a computer-implemented process to create a computer or other programmable data. Instructions for performing the processing equipment may also provide steps for performing the functions described in the flowchart block (s).

이하, 본 발명의 실시예들에 의하여 유니코드를 지원하지 않는 압축포맷의 파일 압축과 복원 장치 및 방법을 설명하기 위한 도면들을 참고하여 본 발명에 대해 설명하도록 한다.Hereinafter, the present invention will be described with reference to the drawings for explaining a method and apparatus for compressing and restoring a file in a compression format that does not support Unicode according to embodiments of the present invention.

도 1은 본 발명에 따른 압축파일의 생성 방법을 설명하기 위한 개념도 이다.1 is a conceptual diagram illustrating a method of generating a compressed file according to the present invention.

먼저, 도 1에서와 같이 파일압축 시, 압축대상파일을 선정(S110)한 후, 압축파일을 생성할 운영체제의 코드페이지 정보를 추출한다(S120). 추출된 코드페이지는 압축대상파일의 목록 압축 및 압축파일 생성 시 함께 저장(S130)되어 최종적으로 압축파일(S140)을 생성할 수 있다.First, when compressing a file as shown in FIG. 1, after selecting a compression target file (S110), codepage information of an operating system for generating a compressed file is extracted (S120). The extracted code page is stored together when the list of compression target files are compressed and the compressed file is generated (S130), and finally the compressed file (S140) may be generated.

도 2는 본 발명에 따른 압축 파일을 복원하는 방법에 관한 개념도 이다.2 is a conceptual diagram of a method for restoring a compressed file according to the present invention.

도 2에 도시한 바와 같이, 압축 복원 대상파일을 선택한 후(S210), 압축파일에 저장되어 있는 압축파일 생성 시 운영체제의 코드페이지를 추출(S220)한다. 그리고 나서, 압축파일 복원 시 운영체제의 코드페이지를 상기 추출한 코드페이지로 변경하고 압축대상파일명 복원 및 복원파일을 생성(S230)하여 최종적으로 복원파일을 생성할 수 있다(S240). As shown in FIG. 2, after selecting a decompression target file (S210), the code page of the operating system is extracted (S220) when the compressed file stored in the compressed file is generated. Then, when restoring the compressed file, the code page of the operating system may be changed to the extracted code page, and a compressed file name may be restored and a restored file may be generated (S230) to finally generate a restored file (S240).

이와 같은 본 발명의 유니코드를 지원하지 않는 압축포맷의 파일 압축과 복원 방법을 플로우 차트를 참조하여 보다 상세하게 설명하면 다음과 같다.Such a method of compressing and restoring a file in a compression format that does not support Unicode according to the present invention will be described in more detail with reference to a flowchart.

도 3은 본 발명의 압축파일 생성 방법을 설명하기 위한 흐름도이다.3 is a flowchart illustrating a method of generating a compressed file of the present invention.

먼저, 도 3에서와 같이 파일 압축 및 압축 복원 프로그램을 실행 한 뒤(S310), 압축대상파일이나 폴더를 선택한 후(S320) 선택된 압축대상파일의 압축 정보를 추출 한다(S330). 이때, 상기 압축 정보는 압축 프로그램이 실행된 운영 체제 내의 코드페이지 정보를 포함하며, 코드페이지 정보는 압축대상파일의 파일 명에 대응되는 정보를 포함할 수 있다.First, after executing a file compression and compression restoration program as shown in Figure 3 (S310), after selecting the compression target file or folder (S320) and extracts the compression information of the selected compression target file (S330). In this case, the compressed information may include code page information in an operating system on which a compression program is executed, and the code page information may include information corresponding to a file name of a file to be compressed.

도 5는 본 발명에 따라 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법에 따른 압축 파일 구조이다. 도 5를 참조하여 설명하면, 압축파일 포맷의 파일 헤더(510)에 확장 헤더(540) 지원 여부를 확인 한다(S340). 여기서, 압축 파일 포맷은 ZIP 파일 등의 압축 포맷을 포함할 수 있으며, 이에 한정되지 않고, 데이터 파일의 내용을 모두 포함하면서 데이터 크기를 감축시키도록 하는 파일 포맷이라면 본 발명에서의 압축 파일 포맷으로 이해될 수 있다. 5 is a compressed file structure according to a file compression and decompression method of a compression format not supporting Unicode according to the present invention. Referring to FIG. 5, it is checked whether the extension header 540 is supported in the file header 510 of the compressed file format (S340). Here, the compressed file format may include a compressed format such as a ZIP file, but is not limited thereto. If the compressed file format includes all the contents of the data file and reduces the data size, it is understood as the compressed file format in the present invention. Can be.

소정의 포맷 내의 파일 헤더(510)가 확장 헤더(540)를 지원하는 경우, 확장 헤더(Extra header)(540)에 상기 코드페이지를 저장(S350)하고, 압축대상파일 목록을 압축하여 압축파일을 생성(S380)한다.When the file header 510 in the predetermined format supports the extension header 540, the code page is stored in the extra header 540 (S350), and the compressed file list is compressed to compress the compressed file. Create (S380).

압축 파일 포맷의 파일 헤더(510)가 확장 헤더(540)를 지원하지 않는다면 상기 코드페이지 정보가 포함하는 압축 파일의 이름 명 등에 대응되는 압축 정보를 포함하는 정보파일을 생성(S360)하여 압축대상파일 목록에 정보파일을 추가(S370)하고, 압축대상파일 목록을 압축하여 압축파일을 생성(S380)한다.If the file header 510 of the compressed file format does not support the extension header 540, an information file including compressed information corresponding to the name of the compressed file included in the codepage information and the like is generated (S360) to compress the target file. The information file is added to the list (S370), and the compressed file list is compressed to generate a compressed file (S380).

도 4는 압축된 데이터를 복원하는 방법에 관한 것이다. 도 4에 도시한 바와 같이, 압축 및 압축복원 프로그램을 실행(S410)하고 압축 복원 대상 파일을 선택(S420)한다. 4 relates to a method of restoring compressed data. As shown in FIG. 4, a compression and decompression program is executed (S410), and a decompression target file is selected (S420).

도 5를 다시 참조하여 설명하면, 압축복원 대상 압축파일의 파일 헤더(510)를 분석하고 파일목록을 추출(S430)하여 압축파일 생성 시의 압축 정보의 존재 여부를 확인한다(S440). 여기서, 압축 정보는 압축 파일 생성 시의 운영체제의 코드페이지 정보를 포함할 수 있다.Referring to FIG. 5 again, the file header 510 of the compression restoration target compressed file is analyzed and the file list is extracted (S430) to confirm the existence of compressed information when generating the compressed file (S440). In this case, the compressed information may include code page information of an operating system when the compressed file is generated.

상기 파일 헤더(510)의 확장 헤더(540)에 압축 정보가 존재하는 경우에는 압축파일 복원 시 운영 체제의 제 2 코드페이지를 추출한 후, 추출한 제 2 코드페이지를 상기 압축 정보에 포함되어 있는 제 1 코드페이지로 변경(S450)하고, 상기 변경된 제 1 코드페이지를 통하여 압축파일을 복원하고 파일을 생성(S490)한다.If compressed information is present in the extension header 540 of the file header 510, the second code page of the operating system is extracted when the compressed file is restored, and then the extracted second code page is included in the compressed information. A code page is changed (S450), a compressed file is restored through the changed first code page, and a file is generated (S490).

상기 파일 헤더(510)의 확장 헤더(540)에 압축 정보가 존재하지 않는 경우에는 압축파일의 내부 목록에 압축파일 생성 시 운영체제의 제 1 코드페이지 정보가 저장된 정보 파일의 정보 존재 여부를 확인(S460)한다. 상기 압축 정보는 압축대상 파일의 파일명에 대응되는 대응정보가 존재하는 경우, 대응 정보를 우선적으로 압축 복원하고 대응 정보가 저장되어 있는 코드페이지 정보를 추출(S470)한다. 압축파일 복원 시 코드페이지를 정보파일에 저장된 코드페이지로 변경(S472)하고, 압축파일 내부 목록에서 정보파일을 제거(S474)한 뒤 압축파일 코드페이지를 통하여 압축파일을 복원하고 파일을 생성(S490)한다.If the compressed information does not exist in the extension header 540 of the file header 510, it is determined whether information of the information file in which the first codepage information of the operating system is stored when generating the compressed file is included in the internal list of the compressed file (S460). )do. When there is corresponding information corresponding to the file name of the file to be compressed, the compressed information is first decompressed and decompressed, and the code page information in which the corresponding information is stored is extracted (S470). When the compressed file is restored, the code page is changed to the code page stored in the information file (S472), the information file is removed from the internal list of the compressed file (S474), and the compressed file is restored through the compressed file code page (S490). )do.

상기 압축 정보가 존재하지 않는 경우 사용자에게 코드페이지 종류를 제시하고 코드페이지 선택에 관한 입력(S480)을 받는다. 압축복원 코드페이지를 사용자로부터 선택된 코드페이지로 변경(S485)하고, 변경된 코드페이지를 통하여 압축파일을 복원하고 파일을 생성(S490)한다.If the compressed information does not exist, a code page type is presented to the user and an input (S480) regarding code page selection is received. The compression restore code page is changed to a code page selected by the user (S485), the compressed file is restored through the changed code page, and a file is generated (S490).

이와 같이, 압축파일을 복원할 때 압축파일 복원 시 운영체제의 코드페이지가 아닌 압축파일 생성 시 운영체제의 코드페이지로 복원함으로써 언어가 다른 운영체제와 호환이 이루어지도록 한다.As such, when the compressed file is restored, the language is made compatible with other operating systems by restoring the compressed file to the code page of the operating system when the compressed file is generated, rather than the code page of the operating system.

도 5는 본 발명에 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법에 따른 압축 파일 구조이다. 5 is a compressed file structure according to a file compression and decompression method of a compression format that does not support Unicode in the present invention.

압축 파일은 파일 헤더(File header)(510), 파일 데이터(File data)(520), 파일 디스크립터(File descriptor)(530)를 포함한다. The compressed file includes a file header 510, a file data 520, and a file descriptor 530.

파일 헤더(510)는 압축 방법(Compression method), 파일 이름 길이(File name length), 확장 헤더(Extra header)(540)과 같이 압축파일 내부에 압축된 개개의 파일에 대한 압축정보를 저장하는 헤더를 말한다. The file header 510 is a header for storing compressed information about individual files compressed in the compressed file, such as a compression method, a file name length, and an extra header 540. Say.

확장 헤더(540)는 압축 포맷에서 확장된 정보를 나타내기 위하여 설계된, 동 일한 형태이며 존재 유무가 가변적인 헤더이다.The extension header 540 is a header of the same type and presence or absence of a variable that is designed to represent the extended information in the compression format.

파일 데이터(520)는 압축파일 내부에 압축된 개개의 파일 데이터를 말한다. The file data 520 refers to individual file data compressed in the compressed file.

파일 디스크립터(530)는 파일 압축 사이즈나 파일 복원 사이즈에 대한 정보를 저장한다. The file descriptor 530 stores information about a file compression size or a file restoration size.

파일 압축 및 복원 프로그램이 압축파일 포맷에서 확장 헤더(540)의 지원 여부를 확인한다. 확장 헤더(540)를 지원하는 경우 압축파일 포맷의 확장 헤더(540)에 압축파일 생성 시 운영체제의 제 1 코드페이지를 저장하여 압축파일을 생성한다. 압축파일을 복원 시 파일 압축 및 복원 장치는 압축파일 포맷에 확장 헤더 지원 여부를 확인하여, 확장 헤더(540)에 기록된 코드페이지가 있는 경우, 압축파일을 복원할 운영체제의 제 2 코드페이지를 확장 헤더(540)에 기록된 제 1 코드페이지로 변경하여 압축파일을 복원한다.The file compression and decompression program checks whether the extension header 540 is supported in the compressed file format. When the extension header 540 is supported, the compressed file is generated by storing the first code page of the operating system when generating the compressed file in the extension header 540 of the compressed file format. When restoring the compressed file, the file compression and decompression device verifies whether the compressed file format supports the extended header, and expands the second code page of the operating system to restore the compressed file if there is a code page recorded in the extended header 540. The compressed file is restored by changing to the first code page recorded in the header 540.

도 6은 본 발명의 일실시예에 따른, 유니코드를 지원하지 않는 압축파일 포맷의 파일 압축과 복원 장치의 구성을 나타내는 블록도이다.6 is a block diagram illustrating a configuration of a device for compressing and restoring a file in a compressed file format that does not support Unicode according to an embodiment of the present invention.

도 6을 참조하여 살펴보면, 파일 압축 및 압축복원 장치(610)는 압축파일 생성 시 제 1 코드페이지 정보를 추출하는 압축대상파일 정보추출모듈(630), 압축파일 생성 시 운영체제 코드페이지 정보 저장모듈(640), 코드페이지 정보를 포함한 압축파일 생성모듈(650), 압축파일 복원 시 코드페이지 정보를 추출하는 압축파일 정보추출모듈(660) 및 코드페이지 정보를 이용한 압축파일명 복원모듈(670)을 포함할 수 있다. 파일 압축 및 압축복원 장치(610)를 구성하고 있는 각각의 구성요소에 대해 살펴 보기로 한다.Referring to FIG. 6, the file compression and compression restoration apparatus 610 includes a compression target file information extraction module 630 for extracting first code page information when a compressed file is generated, and an operating system code page information storage module when a compressed file is generated ( 640), a compressed file generation module 650 including code page information, a compressed file information extraction module 660 for extracting code page information when the compressed file is restored, and a compressed file name restoration module 670 using code page information. Can be. Each component constituting the file compression and compression restoration apparatus 610 will be described.

압축대상파일 정보추출모듈(630)은 압축파일 생성 시 C프로그램의 run-time 함수를 사용하여 압축파일을 생성하는 운영체제의 코드페이지 정보를 얻을 수 있다. 파일 압축 및 복원 장치(610)에서 압축대상파일을 선택하고 압축파일을 생성하기 전, C프로그램의 run-time 함수 중 _getmbcp 가 호출된다. _getmbcp는 압축파일을 생성하는 현재 운영체제의 기본 코드페이지 정보를 추출한다. The compression target file information extraction module 630 may obtain codepage information of an operating system for generating a compressed file using a run-time function of a C program when generating a compressed file. Before the file compression and decompression device 610 selects a compression target file and generates a compressed file, _getmbcp is called among run-time functions of the C program. _getmbcp extracts the default code page information of the current operating system that creates the archive.

압축파일 생성 시 운영체제 제 1 코드페이지 정보 저장모듈(640)은 압축대상파일 정보추출모듈(630)을 통하여 추출한 상기 코드페이지 정보를 압축파일 포맷에 확장 헤더가 있는 경우 확장 헤더에 저장하고, 확장 헤더가 없는 경우 상기 제 1 코드페이지 정보를 저장할 정보파일을 생성하여 저장한다.When the compressed file is generated, the operating system first code page information storage module 640 stores the code page information extracted through the compression target file information extraction module 630 in an extension header when the compressed file format has an extension header, and expands the header. If there is no information file for storing the first code page information is generated and stored.

압축파일 생성모듈(650)은 저장모듈(640)을 통하여 저장된 코드페이지를 확장 헤더(540)가 존재하는 경우 확장 헤더를 포함한 압축파일을 생성하고, 확장 헤더(540)가 존재하지 않는 경우 정보파일을 압축대상파일 목록에 추가하여 압축파일을 생성한다.The compressed file generation module 650 generates a compressed file including the extension header when the extension header 540 exists in the code page stored through the storage module 640, and an information file when the extension header 540 does not exist. To create a compressed file by adding it to the list of compressed files.

압축파일 복원 시 압축파일 정보추출모듈(660)은 압축파일 포맷을 확인한다. 확장 헤더(540)가 존재하는 경우, 확장 헤더(540)에 기록된 상기 제 1 코드페이지 정보를 추출한다. 확장 헤더(540)가 존재하지 않는 경우, 압축파일 내부 목록에서 정보파일의 존재 여부를 확인한다. 정보파일이 존재하는 경우, 정보파일을 우선 압축 복원하여 제 1코드페이지 정보를 추출한다.When the compressed file is restored, the compressed file information extraction module 660 checks the compressed file format. If the extension header 540 is present, the first codepage information recorded in the extension header 540 is extracted. If the extension header 540 does not exist, the existence of the information file is checked in the compressed file internal list. If the information file exists, the information file is first decompressed and the first code page information is extracted.

정보파일이 존재하지 않는 경우, 사용자로 하여금 압축 복원 제 1 코드페이지 정보를 직접 선택하게 하여 제 1 코드페이지 정보를 추출한다.If the information file does not exist, the user is allowed to directly select the decompression first codepage information to extract the first codepage information.

코드페이지 정보를 이용한 압축파일명 복원모듈(670)은 상기 복원 시 압축파일 정보추출모듈(660)에서 얻은 코드페이지 정보를 이용하여 압축파일을 복원한다.The compressed file name restoration module 670 using the code page information restores the compressed file using the code page information obtained from the compressed file information extraction module 660 at the time of restoration.

제어 모듈(620)은 파일 압축 및 복원 장치(610) 내의 모든 구성 요소(630 내지 670)를 관리 또는 제어할 수 있으며, 사용자의 설정에 따라, 일부 구성요소를 선택적으로 사용할 수 있도록 제어할 수 있다.The control module 620 may manage or control all the components 630 to 670 in the file compression and decompression device 610, and may control to selectively use some components according to a user's setting. .

일실시예로, 압축파일 포맷에 확장 헤더(540) 존재 여부에 따라 확장 헤더에 코드페이지를 저장할 수도 있고, 정보파일을 생성하여 코드페이지를 저장할 수도 있다. 또 압축파일 복원 사용자가 직접 압축 복원 코드페이지 정보를 입력할 수도 있다.In one embodiment, the code page may be stored in the extension header depending on whether the extension header 540 is present in the compressed file format, or the code page may be generated by generating the information file. You can also enter the decompression codepage information yourself.

본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구의 범위에 의하여 나타내어지며, 특허청구의 범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.Those skilled in the art will appreciate that the present invention can be embodied in other specific forms without changing the technical spirit or essential features of the present invention. Therefore, it should be understood that the embodiments described above are exemplary in all respects and not restrictive. The scope of the present invention is indicated by the scope of the following claims rather than the detailed description, and all changes or modifications derived from the meaning and scope of the claims and the equivalent concept are included in the scope of the present invention. Should be interpreted.

도 1은 본 발명에 따라 유니코드를 지원하지 않는 압축포맷의 압축파일 생성 방법을 설명하기 위한 개념도1 is a conceptual diagram illustrating a method for generating a compressed file of a compressed format that does not support Unicode according to the present invention.

도 2는 본 발명에 따라 유니코드를 지원하지 않는 압축포맷의 복원파일 생성 방법을 설명하기 위한 개념도2 is a conceptual diagram illustrating a method for generating a restored file of a compressed format that does not support Unicode according to the present invention.

도 3은 본 발명에 따라 유니코드를 지원하지 않는 압축포맷의 압축파일 생성 방법을 설명하기 위한 구체적인 플로우 챠트3 is a detailed flowchart illustrating a method of generating a compressed file of a compressed format that does not support Unicode according to the present invention.

도 4는 본 발명에 따라 유니코드를 지원하지 않는 압축포맷의 복원파일 생성 방법을 설명하기 위한 구체적인 플로우 챠트4 is a detailed flowchart illustrating a method for generating a restored file of a compressed format that does not support Unicode according to the present invention.

도 5는 본 발명에 따른 압축 파일 구조5 is a compressed file structure according to the present invention

도 6은 본 발명에 따라 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 장치6 is a file compression and decompression device of a compression format that does not support Unicode in accordance with the present invention

Claims (13)

압축대상파일이 선택되는 단계;Selecting a compression target file; 상기 선택된 압축대상파일의 압축 정보를 저장하는 단계;Storing compression information of the selected compression target file; 상기 압축대상파일 및 상기 압축 정보를 포함하는 포맷으로 압축 파일을 생성하는 단계를 포함하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법.And generating a compressed file in a format including the compression target file and the compression information. 제 1항에 있어서,The method of claim 1, 상기 압축 정보는, The compressed information, 운영체제 내의 코드페이지 정보를 포함하고, Contains codepage information within the operating system, 상기 코드페이지 정보는 상기 압축대상파일의 파일명에 대응되는 정보를 포함하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법.And the code page information includes information corresponding to a file name of the compression target file. 제 1항에 있어서,The method of claim 1, 상기 소정의 포맷은, The predetermined format is 확장 헤더를 포함하며, 상기 확장 헤더는 상기 코드페이지 정보를 저장하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법. And an extension header, wherein the extension header stores the code page information. 제 1항에 있어서,The method of claim 1, 상기 압축 정보는, The compressed information, 상기 압축대상파일의 파일명에 대응되는 정보를 포함하며, 상기 압축 정보가 압축대상파일 목록에 추가되는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법. And information corresponding to a file name of the compression target file, wherein the compression information is added to a compression target file list. 제 4항에 있어서,The method of claim 4, wherein 상기 저장하는 단계는,The storing step, 상기 압축대상파일 목록을 저장하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법.A method of compressing and restoring a file in a compression format that does not support Unicode, which stores the list of compression target files. 복원 대상 압축 파일이 선택되는 단계;Selecting a restore target compressed file; 상기 선택된 복원 대상 압축 파일로부터 압축 정보를 추출하는 단계;Extracting compressed information from the selected restoration target compressed file; 상기 압축 정보를 이용하여 압축대상파일명 및 복원 파일을 생성하는 단계를 포함하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법.Generating a compression target file name and a restoration file by using the compression information. 제 6항에 있어서,The method of claim 6, 상기 추출하는 단계는,The extracting step, 상기 복원 대상 압축 파일의 확장 헤더가 존재하는지를 확인하고, 상기 확장 헤더가 존재하는 경우, 상기 확장 헤더로부터 상기 압축 정보에 대응되는 제 1 코드페이지 정보를 추출하고, 상기 압축대상파일명을 복원하는 운영체제의 제 2 코드 페이지를 상기 제 1 코드페이지로 변경하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법. Checking whether an extension header of the decompression target compression file exists, and if the extension header exists, extracting first codepage information corresponding to the compression information from the extension header, and restoring the compression target file name; A method of compressing and restoring a file in a compression format that does not support Unicode, which changes a second code page to the first code page. 제 6항에 있어서,The method of claim 6, 상기 압축 정보는, The compressed information, 상기 압축대상파일의 파일명에 대응되는 정보를 포함하고, 상기 압축 정보는 압축 파일 목록에 추가하여 저장되는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법.And information corresponding to a file name of the compression target file, wherein the compression information is stored in addition to a compression file list. 제 8항에 있어서, The method of claim 8, 상기 추출하는 단계는,The extracting step, 상기 압축 파일 목록에 상기 압축 정보가 존재하는 경우, 상기 압축 정보를 추출하고, 상기 제 2 코드페이지에 저장된 압축 정보를 상기 추출된 압축 정보로 변경하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법.If the compressed information is present in the compressed file list, the compressed information is extracted and the compressed information stored in the second code page is changed to the extracted compressed information. And restore method. 제 9항에 있어서,The method of claim 9, 상기 추출하는 단계 이후에.After the extracting step. 상기 압축 파일 복원 목록에서 상기 압축 정보 중 상기 압축대상파일의 파일명에 대응되는 대응 정보를 삭제하는 단계를 더 포함하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법.And deleting corresponding information corresponding to a file name of the compression target file among the compression information in the compressed file decompression list. 제 6항에 있어서, The method of claim 6, 상기 압축 정보가 상기 선택된 복원 대상 압축 파일에 존재하지 않는 경우, 상기 압축 정보는 사용자의 입력에 의해 선택되는 단계를 더 포함하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 방법.If the compression information does not exist in the selected restoration target compression file, the compression information further comprises selecting by a user input. 선택된 압축대상파일의 압축 정보를 저장하는 저장 모듈; 및A storage module for storing compression information of the selected compression target file; And 상기 압축대상파일 및 상기 압축 정보를 포함하는 포맷으로 압축 파일을 생성하는 압축파일 생성 모듈을 포함하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 장치.And a compressed file generation module for generating a compressed file in a format including the compressed target file and the compressed information. 선택된 복원 대상 압축파일의 압축 정보를 추출하는 추출 모듈; 및An extraction module for extracting compression information of the selected restoration target compressed file; And 상기 추출모듈에서 추출한 코드페이지로 압축파일명을 복원하는 복원 모듈을 포함하는, 유니코드를 지원하지 않는 압축포맷의 파일 압축 및 복원 장치.And a restoration module for restoring a compressed file name to a code page extracted by the extraction module.
KR1020070136546A 2007-12-24 2007-12-24 Method and apparatus for file compression and restoration of compression format KR100938277B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070136546A KR100938277B1 (en) 2007-12-24 2007-12-24 Method and apparatus for file compression and restoration of compression format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070136546A KR100938277B1 (en) 2007-12-24 2007-12-24 Method and apparatus for file compression and restoration of compression format

Publications (2)

Publication Number Publication Date
KR20090068787A true KR20090068787A (en) 2009-06-29
KR100938277B1 KR100938277B1 (en) 2010-01-21

Family

ID=40996130

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070136546A KR100938277B1 (en) 2007-12-24 2007-12-24 Method and apparatus for file compression and restoration of compression format

Country Status (1)

Country Link
KR (1) KR100938277B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101016776B1 (en) * 2009-09-21 2011-02-25 (주)이스트소프트 Forward compatibility guaranteed data compression and decompression method and apparatus thereof
US8593312B2 (en) 2009-09-04 2013-11-26 Estsoft Corp. Method and apparatus for compressing and decompressing block unit data

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100418349B1 (en) * 2001-09-05 2004-02-11 (주) 한국인프라 Method for compression and restoration of data
KR20040038271A (en) * 2002-10-31 2004-05-08 주식회사 현대시스콤 Method for compress and uncompress of file

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8593312B2 (en) 2009-09-04 2013-11-26 Estsoft Corp. Method and apparatus for compressing and decompressing block unit data
KR101016776B1 (en) * 2009-09-21 2011-02-25 (주)이스트소프트 Forward compatibility guaranteed data compression and decompression method and apparatus thereof
WO2011034299A2 (en) * 2009-09-21 2011-03-24 (주)이스트소프트 Compression and decompression method and apparatus ensuring upward compatibility
WO2011034299A3 (en) * 2009-09-21 2011-06-30 (주)이스트소프트 Compression and decompression method and apparatus ensuring upward compatibility
US8572054B2 (en) 2009-09-21 2013-10-29 Estsoft Corp. Forward compatibility guaranteed data compression and decompression method and apparatus thereof

Also Published As

Publication number Publication date
KR100938277B1 (en) 2010-01-21

Similar Documents

Publication Publication Date Title
US7350199B2 (en) Converting XML code to binary format
KR101074010B1 (en) Block unit data compression and decompression method and apparatus thereof
CN107341102B (en) Test case file generation method and device
US8572054B2 (en) Forward compatibility guaranteed data compression and decompression method and apparatus thereof
CN109885324A (en) A kind of processing method, device, terminal and the storage medium of application program installation kit
US20080250398A1 (en) Device, method, and computer program product for outputting storage location of verification-target character string
CN105975311A (en) Application startup method and device
CN100585561C (en) Method for clipping relocatable ELF files in embedded system
CN111950247A (en) Configuration-based Word document generation method
KR100938277B1 (en) Method and apparatus for file compression and restoration of compression format
CN111984595B (en) File processing method and device and storage medium
US20150248432A1 (en) Method and system
US9223576B2 (en) Reducing a set of instructions for execution on a processor and expanding a set of instructions on a processor
CN108959411B (en) Processing method, device and equipment of ETL (extract transform and load) task
US8959088B2 (en) Log management method, log management system, and information processing apparatus
CN105279247A (en) Expression library generation method and device
JP5674974B2 (en) Compressed data processing program, compressed data editing program
JPWO2005101210A1 (en) Data analysis apparatus and data analysis program
CN106776730B (en) Chinese compression and decompression method and device based on JAVA language
CN104657131A (en) Generation system and generation method of software installation package
JP2007058645A (en) Xml data compression device, xml data compression method and xml data compression program
JP2008217809A (en) Structured document converting device
CN113849470A (en) Method and system for extracting electronic seal based on electronic invoice OFD file
CN115221437A (en) Font file loading method and device, electronic equipment and storage medium
CN117251451A (en) Configuration data acquisition method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130110

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20160113

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20190313

Year of fee payment: 12