CN101110068A - Encoding method suitable for single codeword lattice character library - Google Patents

Encoding method suitable for single codeword lattice character library Download PDF

Info

Publication number
CN101110068A
CN101110068A CNA2007100185116A CN200710018511A CN101110068A CN 101110068 A CN101110068 A CN 101110068A CN A2007100185116 A CNA2007100185116 A CN A2007100185116A CN 200710018511 A CN200710018511 A CN 200710018511A CN 101110068 A CN101110068 A CN 101110068A
Authority
CN
China
Prior art keywords
index data
page
leaf
code word
encoded
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CNA2007100185116A
Other languages
Chinese (zh)
Inventor
陈淮琰
韩召宁
杨亚冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Besta Xian Co Ltd
Original Assignee
Inventec Besta Xian Co Ltd
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 Inventec Besta Xian Co Ltd filed Critical Inventec Besta Xian Co Ltd
Priority to CNA2007100185116A priority Critical patent/CN101110068A/en
Publication of CN101110068A publication Critical patent/CN101110068A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses an encoding method applicable for a matrix word stock of Unicode, which is characterized in that: the method first of all judges whether a code page in the matrix work stock is blank or not, generates a first index data comprising the judgment result and address of the code page; if the code page is not blank, the invention will encode the type matrix of the code page via encoding arithmetic to generate the encoded type matrix; add a second index data corresponding to the encoded type matrix in the code page; then, generate a mark indicating the code page is not blank and a first index data for the address of the code page; then, generate an index data for the structure of word stock; lastly, integrate the index data for the structure of word stock, the first and second index data of each code page as well as the encoded type matrix to form an encoded matrix word stock. Therefore, the invention can reduce the space needed for the storage of matrix word stock.

Description

A kind of coding method that is applicable to single codeword lattice character library
Technical field
The present invention relates to a kind of coding method, particularly a kind of coding method that is applicable to single sign indicating number (unicode) word lattice character library.
Background technology
Single code coding method is an international standard literal code standard, and in order to provide each character a unique bit code, no matter this character is used for which kind of platform, which kind of program, which kind of language.Single code coding method has comprised each languages font information of various countries, and is applied in the increasing system, as XML, Java or WML or the like.See also Fig. 1, the figure shows a kind of organization chart of single codeword lattice character library well known in the art.Among the figure, all type matrixes that single codeword lattice character library comprised are according to its coding site sequential storage in single code coding method, numeral as shown in FIG., coding range 0~65535 (0x0000~0xFFFF), can be divided into 256 pages (page) in logic, each page or leaf comprises 256 type matrixes.When system receives a character code, and can in single codeword lattice character library, search the type matrix of corresponding this character code and show, when for example character code was 0x6410, its corresponding page number value was 0X64 (decimal value is 100), and was encoded to 0x10 (decimal value is 16) in the page or leaf.
And dot matrix word library is compared in vector font library, has that storage space is little, the better simply advantage of algorithm, and therefore, single sign indicating number coding dot matrix word library is to be widely used in memory capacity is limited, execution speed is the not high mancarried device and intelligent electronic device.Yet the single sign indicating number coding dot matrix word library of a 24X24 still needs the memory headroom of about 4.5M.Therefore, for the limited embedded equipment or mancarried device of memory capacity, how to reduce the shared storage area of single sign indicating number coding dot matrix word library, the speed that does not influence in the type matrix search process simultaneously is a problem demanding prompt solution.
Summary of the invention
At every problem that above-mentioned prior art exists, purpose of the present invention just provides a kind of coding method that is applicable to single codeword lattice character library, reducing the required storage area of dot matrix word library, and takes into account the speed in the type matrix search process.
In order to realize above-mentioned task, the applicant proposes following technical solution based on research and development and many practical experience for many years:
A kind of coding method that is applicable to single codeword lattice character library, this method is encoded to a single code-point battle array character library that stores a plurality of type matrixes, and this dot matrix word library includes a plurality of code word pages or leaves, it is characterized in that, comprises the following steps:
Judge at first whether each code word page or leaf is a blank page, if a code word page or leaf wherein is a blank page, generation one comprises first index data of judged result; If wherein a code word page or leaf is not a blank page, then uses encryption algorithm that the type matrix of this code word page or leaf is encoded producing a plurality of type matrixes of having encoded, and in this code word page or leaf, increase by second index data of the address of the corresponding type matrix of having encoded; And
Produce first index data that comprises the address of the sign that is expressed as the non-NULL white page and this code word page or leaf;
Described blank page and non-NULL white page are produced character library configuration index data, and these character library configuration index data comprise the character library configuration index data that put in order of first index data, second index data and the type matrix of having encoded of corresponding each code word page or leaf;
First index data, second index data of character library configuration index data, each code word page or leaf and the type matrix of having encoded are formed the dot matrix word library of having encoded.
Wherein, encryption algorithm is huffman coding method (Huffman Encoding), and forms the huffman-coded coefficients table, and this huffman-coded coefficients table is included in the dot matrix word library of encoding.
Method of the present invention does not have the type matrix storage area of blank code word page or leaf, only comprises the character pattern data of coding of all non-blank-white code word pages or leaves, therefore can reduce the required storage area of dot matrix word library, does not influence the speed in the type matrix search process.
Description of drawings
Fig. 1 is the organization chart of a kind of single codeword lattice character library well known in the art;
Fig. 2 is the flow chart of steps of coding method of the present invention;
Fig. 3 is the organization chart of the single codeword lattice character library of having encoded of the present invention;
Fig. 4 is the flow chart of steps of the embodiment of type matrix method for searching of the present invention;
Reference numeral among the figure is represented respectively: 30, character library configuration index data, 31, index data district, 311,312,313,314,315, index data, 3110,3130,3150, code word page address, 32, huffman-coded coefficients table, 33, type matrix information data area, 3311,3331,3351, the encode allocation index of type matrix, 3312,3332,3352, the encode content of type matrix, 40~46, the type matrix information data area.
For clearer understanding characteristics of the present invention and the technique effect that reached, the present invention is done further detailed explanation below in conjunction with the preferred embodiment that accompanying drawing and inventor provide.
Embodiment
The coding method that is applicable to single codeword lattice character library of the present invention, this method adopts encodes to single sign indicating number (Unicode) dot matrix word library that stores a plurality of type matrixes, wherein this dot matrix word library system comprises a plurality of code word pages or leaves (page), comprise: judge whether each code word page or leaf is a blank page, if a code word page or leaf wherein is a blank page, generation one comprises first index data of judged result; If a code word page or leaf is not a blank page, then use an encryption algorithm that the type matrix of this code word page or leaf is encoded to produce a plurality of type matrixes of having encoded, and in this code word page or leaf, increase by second index data of the address of corresponding this type matrix of having encoded a bit, and produce first index data that comprises the address of the sign that is expressed as the non-NULL white page and this code word page or leaf;
Blank page and non-NULL white page are produced character library configuration index data, and these character library configuration index data comprise the character library configuration index data that put in order of first index data, second index data and the type matrix of having encoded of corresponding each code word page or leaf;
First index data, second index data of character library configuration index data, each code word page or leaf and the type matrix of having encoded are formed the dot matrix word library of having encoded.
See also Fig. 2, this figure is the flow chart of steps that is applicable to the coding method of single codeword lattice character library of the present invention, and this method is used for single codeword lattice character library is as shown in Figure 1 encoded, and specifically comprises the following step:
Step 20: judge whether each code word page or leaf is a blank page in the dot matrix word library, if then execution in step 21, if not, then execution in step 22;
Step 21: generation one is expressed as first index data of the sign of blank page;
Step 22: use an encryption algorithm, all type matrixes that the code word page or leaf of non-NULL white page is comprised are encoded producing the type matrix of having encoded, and increase by second index data of the address of the corresponding type matrix of having encoded in this code word page or leaf, then execution in step 23;
Step 23: produce first index data that comprises the address of the sign that is expressed as the non-NULL white page and this code word page or leaf;
Step 24: produce character library configuration index data, these character library configuration index data comprise the character library configuration index data that put in order of first index data, second index data and the type matrix of having encoded of corresponding each code word page or leaf;
Step 25: with first index data of character library configuration index data, each code word page or leaf, second index data and the coded word module become the dot matrix word library of having encoded.
At last, finish the flow process of this coding method.
Wherein, second index data relative address of type matrix in the code word page or leaf of preferably having encoded wherein, that encryption algorithm is preferable is huffman coding method (Huffman Encoding), and forms the huffman-coded coefficients table, and this huffman-coded coefficients table is included in the dot matrix word library of encoding.
Above-mentioned huffman coding method (Huffman Encoding) is the known compression algorithms of those skilled in the art of the present technique, is not giving unnecessary details at this.
See also Fig. 3, the figure shows the organization chart of the embodiment of the single codeword lattice character library of encoding that produces according to coding method of the present invention.Among the figure, the single codeword lattice character library of having encoded system uses the huffman coding method to carry out the type matrix coding, and it comprises character library configuration index data 30, index data district 31, a huffman-coded coefficients table 32 and a character pattern data district 33.Character library configuration index data 30 comprise the address in index data district 31, huffman-coded coefficients table 32 and character pattern data district 33 at least.Index data district 31 comprises the index data of all code word pages or leaves (page), the index data 313 of index data the 312, the 3rd code word page or leaf of index data the 311, the 2nd code word page or leaf of the 1st code word page or leaf as shown in FIG., the index data 314 of N code word page or leaf and the index data 315 of the 256th code word page or leaf.The index data of each code word page or leaf comprises at least whether this code word page or leaf of expression is the sign of blank page, and in Fig. 3, the 1st code word page or leaf, the 3rd code word page or leaf and the 256th code word page or leaf are the non-NULL white page, and the 2nd code word page or leaf and N code word page or leaf are blank page.If this code word page or leaf is the non-NULL white page, then index data comprises the address of this code word page or leaf in addition, as the address 3130 of address the 3110, the 3rd code word page or leaf of the 1st code word page or leaf and the address 3150 of the 256th code word page or leaf.
In character pattern data district 33, there is not the type matrix storage area of blank code word page or leaf, only comprise the character pattern data of coding of all non-blank-white code word pages or leaves, therefore can reach the function that reduces the required storage area of character library.Each character pattern data of having encoded comprises the content (as shown in FIG. 3312,3332 and 3352) of the allocation index (as shown in FIG. 3311,3331 and 3351) and the type matrix of having encoded of the type matrix of encoding.Because the character length of the type matrix that the process huffman coding is crossed is inconsistent, therefore can improve the type matrix search speed of the single codeword lattice character library of having encoded of the present invention by the index data of the type matrix of encoding.
See also Fig. 4, this figure is the flow chart of steps of the embodiment of type matrix method for searching of the present invention, and this type matrix method for searching carries out the type matrix searching method and comprises the following step in order to as shown in Figure 3 the single codeword lattice character library of coding 3 is carried out the type matrix search:
Step 40:, in dot matrix word library 3, take out huffman-coded coefficients table 32 according to character library configuration index data;
Step 41: receive a character code, from then on take out page number value in the character code, when for example character code was 0x0110, its district's code value was 0X01, corresponding the 2nd code word page or leaf, and character code is when being 0xFF30, its district's code value is 0XFF, corresponding the 256th code word page or leaf;
Step 42: in index data district 31, take out the index data of corresponding this page number value, when for example character code is 0x0110, then take out index data 312, then take out index data 315 when character code is 0xFF30;
Step 43: according to the sign in the index data, judge whether the code word page or leaf of this corresponding this character code is blank page, if, execution in step 46, if not, then execution in step 44;
Step 44: according to the address in the index data, in dot matrix word library 3, take out the type matrix data, and according to the allocation index of the type matrix of encoding of character pattern data, in the content of the type matrix of encoding of character pattern data, take out the type matrix of coding of corresponding above-mentioned character code;
Step 45: according to huffman-coded coefficients table 32, the obtained type matrix of coding is deciphered, to export the type matrix of corresponding this character code;
Step 46: export an empty word mould, for example the 2nd code word page or leaf of character code 0x0110 correspondence is a blank page, therefore just exports an empty word mould;
At last, finish this flow process.
Though the present invention has made detailed description with above-mentioned preferred embodiment to the present invention, be not to limit the present invention with the foregoing description.Those skilled in the art should recognize under the situation that does not break away from given technical characterictic of technical solution of the present invention and scope, and the increase that technical characterictic is done or with the replacement of some same contents of this area all should belong to protection scope of the present invention.

Claims (2)

1. coding method that is applicable to single codeword lattice character library, this method is encoded to a single code-point battle array character library that stores a plurality of type matrixes, and this dot matrix word library includes a plurality of code word pages or leaves, it is characterized in that, comprises the following steps:
Judge at first whether each code word page or leaf is a blank page, if a code word page or leaf wherein is a blank page, generation one comprises first index data of judged result; If wherein code word page or leaf is not a blank page, then uses encryption algorithm that the type matrix of this code word page or leaf is encoded producing a plurality of type matrixes of having encoded, and in this code word page or leaf, increase by second index data of the address of the corresponding type matrix of having encoded; And
Produce first index data that comprises the address of the sign that is expressed as the non-NULL white page and this code word page or leaf;
Described blank page and non-NULL white page are produced character library configuration index data, and these character library configuration index data comprise the character library configuration index data that put in order of first index data, second index data and the type matrix of having encoded of corresponding each code word page or leaf;
First index data, second index data of character library configuration index data, each code word page or leaf and the type matrix of having encoded are formed the dot matrix word library of having encoded.
2. the method for claim 1 is characterized in that, described encryption algorithm is the huffman coding method, and forms the huffman-coded coefficients table, and this huffman-coded coefficients table is included in the dot matrix word library of encoding.
CNA2007100185116A 2007-08-21 2007-08-21 Encoding method suitable for single codeword lattice character library Pending CN101110068A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007100185116A CN101110068A (en) 2007-08-21 2007-08-21 Encoding method suitable for single codeword lattice character library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007100185116A CN101110068A (en) 2007-08-21 2007-08-21 Encoding method suitable for single codeword lattice character library

Publications (1)

Publication Number Publication Date
CN101110068A true CN101110068A (en) 2008-01-23

Family

ID=39042144

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007100185116A Pending CN101110068A (en) 2007-08-21 2007-08-21 Encoding method suitable for single codeword lattice character library

Country Status (1)

Country Link
CN (1) CN101110068A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799590A (en) * 2011-05-26 2012-11-28 安凯(广州)微电子技术有限公司 Embedded type electronic product word stock as well as word stock generating method and word stock searching method
CN112949257A (en) * 2021-02-26 2021-06-11 深圳市英威腾电气股份有限公司 Character display method, device, equipment and computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799590A (en) * 2011-05-26 2012-11-28 安凯(广州)微电子技术有限公司 Embedded type electronic product word stock as well as word stock generating method and word stock searching method
CN102799590B (en) * 2011-05-26 2017-02-08 安凯(广州)微电子技术有限公司 Embedded type electronic product word stock as well as word stock generating method and word stock searching method
CN112949257A (en) * 2021-02-26 2021-06-11 深圳市英威腾电气股份有限公司 Character display method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN104753540B (en) Data compression method, data decompression method and apparatus
CN100563111C (en) Data coding device, data-encoding scheme
JP5831298B2 (en) Program, information processing apparatus, and index generation method
CN103336690A (en) HTML (Hypertext Markup Language) 5-based text-element drawing method and device
CN101963944B (en) Object storage method and system
CN104123364A (en) Method and device for transmitting and receiving data through mobile terminal
US9128912B2 (en) Efficient XML interchange schema document encoding
CN102970043A (en) GZIP (GNUzip)-based hardware compressing system and accelerating method thereof
CN101963954A (en) Method and device for displaying words
CN105306951A (en) Pipeline parallel acceleration method for data compression encoding and system architecture thereof
CN101639828B (en) Method for hiding and extracting watermark based on XML electronic document
CN101551820B (en) Generation method and apparatus for index database of points of interest attribute
CN104156990A (en) Lossless compressed encoding method and system supporting oversize data window
WO2002035548A3 (en) Storing device, storing control method and program
US10282400B2 (en) Grammar generation for simple datatypes
CN100578943C (en) Optimized Huffman decoding method and device
CN101110068A (en) Encoding method suitable for single codeword lattice character library
EP2442256A1 (en) Method of encoding and decoding text on a matrix code symbol
CN101493901A (en) Two-dimensional code data compressing and decompressing method and terminal
JP5549177B2 (en) Compression program, method and apparatus, and decompression program, method and apparatus
CN105653506A (en) Method and device for processing texts in GPU on basis of character encoding conversion
CN106254313A (en) A kind of general big data acquisition byte stream resolution system and its implementation
CN103092859B (en) A kind of method and device obtaining music file information
CN102708191A (en) Word stock coding and decoding method capable of saving memory
CN202602827U (en) Variable-length decoding device based on universal format code table

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication