KR20180047738A - Utf-8 문자코드의 압축방법 - Google Patents

Utf-8 문자코드의 압축방법 Download PDF

Info

Publication number
KR20180047738A
KR20180047738A KR1020160144404A KR20160144404A KR20180047738A KR 20180047738 A KR20180047738 A KR 20180047738A KR 1020160144404 A KR1020160144404 A KR 1020160144404A KR 20160144404 A KR20160144404 A KR 20160144404A KR 20180047738 A KR20180047738 A KR 20180047738A
Authority
KR
South Korea
Prior art keywords
byte
utf
code
bits
10xxxxxx
Prior art date
Application number
KR1020160144404A
Other languages
English (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 KR1020160144404A priority Critical patent/KR20180047738A/ko
Publication of KR20180047738A publication Critical patent/KR20180047738A/ko

Links

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
    • 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/46Conversion to or from run-length codes, i.e. by representing the number of consecutive digits, or groups of digits, of the same kind by a code word and a digit indicative of that kind
    • H03M7/48Conversion to or from run-length codes, i.e. by representing the number of consecutive digits, or groups of digits, of the same kind by a code word and a digit indicative of that kind alternating with other codes during the code conversion process, e.g. run-length coding being performed only as long as sufficientlylong runs of digits of the same kind are present
    • 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/60General implementation details not specific to a particular type of compression
    • H03M7/6017Methods or arrangements to increase the throughput

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

, 압축헤더를 아래와 같이 추가로 더 사용할 수 있게 되었다.
본 발명에서는 UTF-8로 구성된 문자메시지를 압축하는 발명으로서,
UTF-8 코드의 byte2, byte3, byte4의 구분자인 "10"을 byte 1의 헤더로 활용하고,
아스키 코드가 위치한 U+0000~U+007F에 있어서,
숫자,영문자가 위치하는 0040~007F 범위는
UTF-8코드로, 0 100 xxxx ~ 0 111 xxxx 인데,
최상위 2비트의 "01"을 "0"으로 치환하여 1비트 감축하고
0000~003F 범위는
UTF-8코드로 0 000 xxxx ~ 0 011 xxxx 인데,
최상위 2비트 "00"을 "10"으로 치환하여 byte 1에 "10"이라는 헤더를 사용한다.
아래는 이러한 방식을 적용한 압축UTF-8코드 테이블이다.
U+0040~U+007F에 있어서 1비트씩 압축효과가 생기며,
나머지 sequence들도 byte 2~6의 헤더비트 "10"이 제거되면서 2~6비트씩 압축효과가 발생한다.

Description

UTF-8 문자코드의 압축방법{UTF-8 character set compression method and apparatus thereof}
문자코드압축
문자코드압축
발명을 실시하기 위한 구체적 내용에 상술
발명을 실시하기 위한 구체적 내용에 상술
발명을 실시하기 위한 구체적 내용에 상술
UTF_8 코드 체계의 경우 아래와 같이 유니코드의 값의 범위에 따라, byte 1의 헤더비트를 달리하면서, byte 2~byte 6을 가변적으로 읽어들일수 있게 하였고,
byte 2이후부터는 최상위 비트앞에 10을 규칙적으로 부가한 코드이다.
아래 표의 x 표로 표기한 부분이 유니코드 포인터인 First code point ~ Last code point의
이진화된 비트가 순서대로 표기된 내용을 나타낸다.
예를들어, U+07FF 는 이진수로 111 1111 1111 으로서 전체 11비트이며, 아래 표1에서처럼
110 xxxxx 10 xxxxxx 안에 110 11111 10 111111 형태로 포함되어 2바이트의 UTF코드로 변환되는
원리이다.
bits of First Last Bytes in Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6
code point code point code point sequence
7 U+0000 U+007F 1 0xxxxxxx
11 U+0080 U+07FF 2 110xxxxx 10xxxxxx
16 U+0800 U+FFFF 3 1110xxxx 10xxxxxx 10xxxxxx
21 U+10000 U+1FFFFF 4 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
26 U+200000 U+3FFFFFF 5 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
31 U+4000000 U+7FFFFFFF 6 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
한편, RFC 3629 표준에 따라 2003년 11월에, UTF-8코드가 원래 31비트까지의 코드를 지원했으나,
아래 표2와 같은 형태로 통일적으로 제한하였다. 따라서 현재는 U+0000~U+10FFFF까지의 코드에 대해서 UTF-8로 표현가능하다.
Bits for First valid Last valid Bytes in Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6
code point code point code point sequence
7 U+0000 U+007F 1 0xxxxxxx
11 U+0080 U+07FF 2 110xxxxx 10xxxxxx
16 U+0800 U+FFFF 3 1110xxxx 10xxxxxx 10xxxxxx
21 U+10000 U+1 0 FFFF 4 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
상기 표2와 같이 RFC 3629 표준에 따라 Byte 1의 압축헤더가, 0, 110, 1110, 11110 만 사용하게 됨으로써, 압축헤더를 아래와 같이 추가로 더 사용할 수 있게 되었다.
본 발명에서는 UTF-8로 구성된 문자메시지를 압축하는 발명으로서,
UTF-8 코드의 byte2, byte3, byte4의 구분자인 "10"을 byte 1의 헤더로 활용하고,
아스키 코드가 위치한 U+0000~U+007F에 있어서,
숫자,영문자가 위치하는 0040~007F 범위는
UTF-8코드로, 0 100 xxxx ~ 0 111 xxxx 인데,
최상위 2비트의 "01"을 "0"으로 치환하여 1비트 감축하고
0000~003F 범위는
UTF-8코드로 0 000 xxxx ~ 0 011 xxxx 인데,
최상위 2비트 "00"을 "10"으로 치환하여 byte 1에 "10"이라는 헤더를 사용한다.
아래는 이러한 방식을 적용한 압축UTF-8코드 테이블이다.
U+0040~U+007F에 있어서 1비트씩 압축효과가 생기며,
나머지 sequence들도 byte 2~6의 헤더비트 "10"이 제거되면서 2~6비트씩 압축효과가 발생한다.
Bits for First valid Last valid Bytes in Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6
code point code point code point sequence
6 U+0000 U+003F 1 10xxxxxx
6 U+0040 U+007F 1 0xxxxxx
11 U+0080 U+07FF 2 110xxxxx xxxxxx
16 U+0800 U+FFFF 3 1110xxxx xxxxxx xxxxxx
21 U+10000 U+ 1 0 FFFF 4 11110xxx xxxxxx xxxxxx xxxxxx
복호화 과정은,
byte 1을 먼저 보고,
0, 10, 110, 1110, 11110 인지를 확인한뒤,
표3의 역과정으로 압축해제 한다.
즉, 0 으로 시작하면, "0"을 "01"로 대체하여 압축해제 한다.
"10"으로 시작하면, "00"으로 대체하여 압축해제 한다.
"110", "1110", "11110" 을 만나면, byte 2, 3, 4 에 각각 앞에 "10"을 부가하여 표2와 같이 복호화한다.
한편 byte 1의 헤더비트는,
0, 10, 110, 1110, 11110 외에도, 11111 을 추가로 사용할 수 있다.
11111을 만나면 별도의 압축기 또는 압축해제기가 추가적인 정보처리를 할 수 있는 여분의 코드로 활용될 수 있다.
0, 10, 110, 1110, 11110, 111110 이렇게 6가지를 쓰면, 6비트의 "111111"을 추가로 사용할 수 있음은 자명하다.
0, 10, 110, 1110, 11110, 111110,1111110 이렇게 7가지를 쓰면, 7비트의 "1111111"을 추가로 사용할 수
있음은 자명하다.
0, 10, 110, 1110, 11110, 111110,1111110,11111110 이렇게 8가지를 쓰면, 8비트의 "11111111"을 추가로 사용할 수 있음은 자명하다.

Claims (1)

  1. 국내우선권 주장출원을 위한 출원으로서 별도의 청구범위를 기재하지 아니함.
KR1020160144404A 2016-11-01 2016-11-01 Utf-8 문자코드의 압축방법 KR20180047738A (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160144404A KR20180047738A (ko) 2016-11-01 2016-11-01 Utf-8 문자코드의 압축방법

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160144404A KR20180047738A (ko) 2016-11-01 2016-11-01 Utf-8 문자코드의 압축방법

Publications (1)

Publication Number Publication Date
KR20180047738A true KR20180047738A (ko) 2018-05-10

Family

ID=62184347

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160144404A KR20180047738A (ko) 2016-11-01 2016-11-01 Utf-8 문자코드의 압축방법

Country Status (1)

Country Link
KR (1) KR20180047738A (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102098644B1 (ko) * 2019-01-09 2020-04-08 김정훈 유티에프-8 코드 문자의 압축 방법 및 장치

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102098644B1 (ko) * 2019-01-09 2020-04-08 김정훈 유티에프-8 코드 문자의 압축 방법 및 장치

Similar Documents

Publication Publication Date Title
KR101610609B1 (ko) 데이터 인코더, 데이터 디코더 및 방법
Leavline et al. Hardware implementation of LZMA data compression algorithm
US20100127902A1 (en) Lossless data compression with separated index values and literal values in output stream
CN103347047A (zh) 一种基于网络字典的无损数据压缩方法
Nandi et al. Modified compression techniques based on optimality of LZW code (MOLZW)
KR20180047738A (ko) Utf-8 문자코드의 압축방법
KR101791877B1 (ko) 유티에프-8 코드 문자의 압축 방법 및 장치
KR20180006011A (ko) Utf-8 코드 문자체계에 있어서, byte 1 에 대한 3비트 압축을 통한 한글메시지의 집중적 압축방법 및 그 장치
KR20180004409A (ko) 일반적인 utf-8 형태로 엔코딩된 이진데이터의 실시간 무손실 압축방법
KR101791880B1 (ko) 유티에프-8 코드 문자의 압축 방법 및 장치
KR20180006605A (ko) Utf-8 코드 문자체계에 있어서, byte 1 에 대한 3~5비트 압축을 통한 한글메시지의 집중적 압축방법 및 그 장치
US7930435B2 (en) Hub and spoke compression
Yazdanpanah et al. A simple lossless preprocessing algorithm for hardware implementation of Deflate data compression
KR101752281B1 (ko) 유티에프-8 코드 문자의 압축 방법 및 장치
KR20180004410A (ko) 일반적인 utf-8 형태로 엔코딩된 이진데이터의 실시간 무손실 압축방법
KR102098644B1 (ko) 유티에프-8 코드 문자의 압축 방법 및 장치
KR20180006659A (ko) Utf-8 코드 문자체계에 있어서, byte 1 에 대한 3~5비트 압축을 통한 한글메시지의 집중적 압축방법 및 byte2 에 대한 2~4비트등 집중 압축 방법 및 그 장치
Tsai et al. An improved LZW algorithm for large data size and low bitwidth per code
KR20180007397A (ko) Utf-8 코드 문자체계에 있어서, byte 1 에 대한 3~5비트 압축을 통한 한글메시지의 집중적 압축방법 및 byte2 에 대한 2~4비트등 집중 압축 방법 및 그 장치
Xu et al. SSE lossless compression method for the text of the insignificance of the lines order
KR20180007740A (ko) Utf-8 코드 문자체계에 있어서, byte 1 에 대한 3~5비트 압축을 통한 한글메시지의 집중적 압축방법 및 byte2 에 대한 2~4비트등 집중 압축 방법 및 그 장치
KR20190091586A (ko) TCP/IP 패킷에 있어서 고정비트 길이 이진데이터의 Octet 규격사이즈 압축을 위한 패킷 데이터 압축 방법 및 그 장치
KR20180002145A (ko) Utf-8코드로 구성된 데이터의 유니버설 코드를 이용한 실시간 무손실 무사전 압축방법
Kaur et al. Analysis of Lossless Data Compression Techniques
KR20180005386A (ko) Utf-8코드로 구성된 데이터의 유니버설 코드를 이용한 실시간 무손실 무사전 압축방법