CN102708191A - Word stock coding and decoding method capable of saving memory - Google Patents

Word stock coding and decoding method capable of saving memory Download PDF

Info

Publication number
CN102708191A
CN102708191A CN2012101494654A CN201210149465A CN102708191A CN 102708191 A CN102708191 A CN 102708191A CN 2012101494654 A CN2012101494654 A CN 2012101494654A CN 201210149465 A CN201210149465 A CN 201210149465A CN 102708191 A CN102708191 A CN 102708191A
Authority
CN
China
Prior art keywords
word
information
file
character library
coding
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
CN2012101494654A
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.)
Tong Tong Software Technology (hunan) Co Ltd
Original Assignee
Tong Tong Software Technology (hunan) 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 Tong Tong Software Technology (hunan) Co Ltd filed Critical Tong Tong Software Technology (hunan) Co Ltd
Priority to CN2012101494654A priority Critical patent/CN102708191A/en
Publication of CN102708191A publication Critical patent/CN102708191A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a word stock coding and decoding method capable of saving a memory. The word stock coding and decoding method comprises the following steps: when a word stock is coded, reading a word stock file, analyzing file information, and obtaining word lattice data according to the file information; using a Huffman algorithm or an LZW (Lempel-Ziv-Welch) algorithm to compress the word lattice data to generate a compressed file of the word stock and index file information of the word stock; storing the information to a memory card or a FLASH memory; when the word stock is decoded, reading the memory from the compressed file to an embedded system; obtaining the index information of the present word needing to be displayed in the word stock index file according to the code information; according to the obtained index information, obtaining the compressed data of the word in the compressed file of the word stock; using Huffman decoding or LZW decoding method to decode the compressed data to generate the word lattice data; and displaying the word lattice data. With the adoption of the word stock coding and decoding method capable of saving the memory, storage space during the decoding is small, the storage efficiency of the word stock is greatly improved, and the system is enabled to integrate much word stock information.

Description

A kind of word-base code and coding/decoding method of saving internal memory
Technical field
The present invention relates to the embedded system field, be specially a kind of word-base code and coding/decoding method of saving internal memory.
Background technology
Embedded system is undoubtedly one of the most popular current IT application field.Embedded system is used on some particular private equipment, and the hardware resource of these equipment (like storer, processor etc.) is very limited usually.The mobile phone that we see usually, PDA, electronic dictionary, game machine or the like all are the typical embedded systems.With the mobile phone is example, and mobile phone provides increasing font Presentation Function at present, and provides multinational character library to show, but because the restriction of storage space can't be write down more character library information, has so just limited the application of part font.
Summary of the invention
The technical matters that the present invention solved is to provide a kind of word-base code and coding/decoding method of saving internal memory, to solve the shortcoming in the above-mentioned background technology.
The technical matters that the present invention solved adopts following technical scheme to realize:
A kind of word-base code and coding/decoding method of saving internal memory may further comprise the steps:
The first step: during coding, read font file, Study document information is obtained the word lattice data according to fileinfo;
Second step: use Huffman algorithm or lzw algorithm that the word lattice data are carried out processed compressed, generate character library compressed file and character library index file information; And store in storage card or the FLASH storer;
The 3rd step: during decoding, read the internal memory of compressed file,, in the character library index file, obtain the index information of this word according to internal code information to the current word that needs demonstration to embedded system;
The 4th step:, in the character library compressed file, obtain the packed data of this word according to the index information that obtains;
The 5th step: with Huffman decoding or LZW decoding the packed data that obtains is decoded, generate the font dot array data; The display font dot array data.
Among the present invention, said fileinfo comprises that font information, character library divide page information and character library index code information.
Among the present invention, said character library index file information comprises font code index information, and said font code index information has write down the length information after word compression residing position, back and the compression.
Among the present invention, saidly the word lattice data are carried out processed compressed be meant each word in the character library is carried out processed compressed respectively.
Among the present invention, said compressed file is the packed data that is generated, and comprises character library compressed file and character library index file.
Beneficial effect
The present invention's shared storage space in the process of decompress(ion) is just less a lot, has improved the storage efficiency of character library greatly, makes the system can integrated more character library font information.
Embodiment
For technological means, creation characteristic that the present invention is realized, reach purpose and effect and be easy to understand and understand, below in conjunction with specific embodiment, further set forth the present invention.
Embodiment 1
A kind of word-base code and coding/decoding method of saving internal memory during coding, reads font file, and Study document information is obtained the word lattice data according to fileinfo; Here the fileinfo of analyzing comprises that font information, character library divide page information, character library index code information etc., and wherein character library index code information is the corresponding UNICODE coding of character library institute, is encoded to 0x554A like the UNICODE of " " in the Chinese character base.The word lattice data that obtain are carried out processed compressed; Here adopt the Huffman algorithm, the dot array data of each word in the character library is carried out processed compressed respectively.Generate the character library compressed file; Generate character library index file information, comprise font code index information; The font code index information has here write down the length information after certain word compression residing position, back and the compression; The dot matrix Chinese character of a 16*16 " " for example; Suppose that through its shared length after the Huffman compression algorithm be 18Byte, the index information of " " word is (0,18) in font code index information so; Wherein 0 is the deviation post of " " word, and 18 are the length after the compression.So next, " Ah "'s index information is (18,14) to second word, and wherein 18 is that " reference position of Ah "'s word, 14 are the length after its compression.The file storage that generates is arrived storer, like storage card, FLASH etc.; During decoding, read the internal memory of compressed file to embedded system, the compressed file here is the packed data that is generated, and comprises character library compressed file and character library index file; To the current word that needs demonstration, from the character library index file, obtain the index information of this word according to internal code information; According to the index information that obtains, in the character library compressed file, obtain the packed data of this word; The packed data that obtains is decoded,, generate the font dot array data like Huffman decoding, LZW decoding etc.; The display font dot array data.
More than show and described ultimate principle of the present invention and principal character and advantage of the present invention; The technician of the industry should understand; The present invention is not restricted to the described embodiments; That describes in the foregoing description and the instructions just explains principle of the present invention, and under the prerequisite that does not break away from spirit and scope of the invention, the present invention also has various changes and modifications; These variations and improvement all fall in the scope of the invention that requires protection, and the present invention requires protection domain to be defined by appending claims and equivalent thereof.

Claims (5)

1. a word-base code and a coding/decoding method of saving internal memory is characterized in that, may further comprise the steps:
The first step: during coding, read font file, Study document information is obtained the word lattice data according to fileinfo;
Second step: use Huffman algorithm or lzw algorithm that the word lattice data are carried out processed compressed, generate character library compressed file and character library index file information; And store in storage card or the FLASH storer;
The 3rd step: during decoding, read the internal memory of compressed file,, in the character library index file, obtain the index information of this word according to internal code information to the current word that needs demonstration to embedded system;
The 4th step:, in the character library compressed file, obtain the packed data of this word according to the index information that obtains;
The 5th step: with Huffman decoding or LZW decoding the packed data that obtains is decoded, generate the font dot array data; The display font dot array data.
2. a kind of word-base code and coding/decoding method of saving internal memory according to claim 1 is characterized in that, said fileinfo comprises that font information, character library divide page information and character library index code information.
3. a kind of word-base code and coding/decoding method of saving internal memory according to claim 1; It is characterized in that; Said character library index file information comprises font code index information, and said font code index information has write down the length information after word compression residing position, back and the compression.
4. a kind of word-base code and coding/decoding method of saving internal memory according to claim 1 is characterized in that, saidly the word lattice data are carried out processed compressed is meant each word in the character library is carried out processed compressed respectively.
5. a kind of word-base code and coding/decoding method of saving internal memory according to claim 1 is characterized in that said compressed file is the packed data that is generated, and comprises character library compressed file and character library index file.
CN2012101494654A 2012-05-15 2012-05-15 Word stock coding and decoding method capable of saving memory Pending CN102708191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012101494654A CN102708191A (en) 2012-05-15 2012-05-15 Word stock coding and decoding method capable of saving memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012101494654A CN102708191A (en) 2012-05-15 2012-05-15 Word stock coding and decoding method capable of saving memory

Publications (1)

Publication Number Publication Date
CN102708191A true CN102708191A (en) 2012-10-03

Family

ID=46900957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012101494654A Pending CN102708191A (en) 2012-05-15 2012-05-15 Word stock coding and decoding method capable of saving memory

Country Status (1)

Country Link
CN (1) CN102708191A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942185A (en) * 2014-03-28 2014-07-23 武汉传神信息技术有限公司 Method and system for storing document
CN107291935A (en) * 2017-07-04 2017-10-24 东北大学 The CPIR V arest neighbors privacy protection enquiring methods encoded based on Spark and Huffman
CN112230873A (en) * 2020-10-14 2021-01-15 天津津航计算技术研究所 Display processing method based on DSP

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1335733A (en) * 2000-09-26 2002-02-13 深圳市中兴通讯股份有限公司 Handwriting inputting, sending and receiving method and system for mobile terminal
CN1367464A (en) * 2002-03-15 2002-09-04 崔巍 Compressed Chinese character library chip
CN1855023A (en) * 2005-04-21 2006-11-01 上海集通数码科技有限责任公司 Universal compressed Chinese character library chip
CN102262784A (en) * 2011-08-02 2011-11-30 杭州士兰微电子股份有限公司 Method for coding and decoding word library based on image compression

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1335733A (en) * 2000-09-26 2002-02-13 深圳市中兴通讯股份有限公司 Handwriting inputting, sending and receiving method and system for mobile terminal
CN1367464A (en) * 2002-03-15 2002-09-04 崔巍 Compressed Chinese character library chip
CN1855023A (en) * 2005-04-21 2006-11-01 上海集通数码科技有限责任公司 Universal compressed Chinese character library chip
CN102262784A (en) * 2011-08-02 2011-11-30 杭州士兰微电子股份有限公司 Method for coding and decoding word library based on image compression

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942185A (en) * 2014-03-28 2014-07-23 武汉传神信息技术有限公司 Method and system for storing document
CN107291935A (en) * 2017-07-04 2017-10-24 东北大学 The CPIR V arest neighbors privacy protection enquiring methods encoded based on Spark and Huffman
CN107291935B (en) * 2017-07-04 2020-09-29 东北大学 Spark and Huffman coding based CPIR-V nearest neighbor privacy protection query method
CN112230873A (en) * 2020-10-14 2021-01-15 天津津航计算技术研究所 Display processing method based on DSP
CN112230873B (en) * 2020-10-14 2022-07-08 天津津航计算技术研究所 Display processing method based on DSP

Similar Documents

Publication Publication Date Title
US10116325B2 (en) Data compression/decompression device
US11151126B2 (en) Hybrid column store providing both paged and memory-resident configurations
US20130307709A1 (en) Efficient techniques for aligned fixed-length compression
KR102249267B1 (en) Method and device for encoding and decoding binary data
CN101261825B (en) A word library management method for mobile terminal system
CN103236847A (en) Multilayer Hash structure and run coding-based lossless compression method for data
US20200294629A1 (en) Gene sequencing data compression method and decompression method, system and computer-readable medium
US8847797B1 (en) Byte-aligned dictionary-based compression and decompression
CN104753540A (en) Data compression method, data decompression method and device
CN104410424B (en) The fast and lossless compression method of embedded device internal storage data
CN103258030A (en) Mobile device memory compression method based on dictionary encoding and run-length encoding
CN106849956B (en) Compression method, decompression method, device and data processing system
CN104125458A (en) Lossless stored data compression method and device
CN112035706A (en) Encoding method, decoding method, computer device, and readable storage medium
EP2482231A1 (en) Method for encoding and decoding data on a matrix code symbol
CN106688186A (en) Sharing initial dictionaries and huffman trees between multiple compressed blocks in LZ-based compression algorithms
CN102708191A (en) Word stock coding and decoding method capable of saving memory
EP2442256B1 (en) Method of encoding and decoding text on a matrix code symbol
CN104133883B (en) Telephone number ownership place data compression method
US20220199202A1 (en) Method and apparatus for compressing fastq data through character frequency-based sequence reordering
CN102262784B (en) Method for coding and decoding word library based on image compression
CN103138766A (en) Method and device of compression and decompression of data
US9135009B2 (en) Apparatus and method for compressing instructions and a computer-readable storage media therefor
CN102567209B (en) Flash memory chip data analyzing method and flash memory chip data analyzing device
CN101950283A (en) Wireless terminal system based font bank compressing and decompressing method

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

Application publication date: 20121003