Encoding method, decoding method, encoding device and decoding device

A coding device and coding method technology, applied in the direction of code conversion, electrical components, etc., can solve the problems that some characters cannot be used in file names, arithmetic expression ambiguity, etc.

Inactive Publication Date: 2016-03-30
HUAWEI TECH CO LTD +1
View PDF5 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present invention provide an encoding and decoding method, an encoding device, and a decoding device to solve the problem that some characters in the 64-ary encoding method in the prior art cannot be used as file names under the linux operating system and the windows operating system, and the ambiguity problem

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Encoding method, decoding method, encoding device and decoding device
  • Encoding method, decoding method, encoding device and decoding device
  • Encoding method, decoding method, encoding device and decoding device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments.

[0041]Base64 encoding is an encoding method based on 64 printable characters to represent binary data. Since 2 to the 6th power is equal to 64, every 6 bits is a unit, which corresponds to a printable character. When using Base64 encoding, read three bytes of data each time for encoding, three bytes total 24 bits, each 6 bits is a unit, three bytes of data correspond to 4 units, and use Base64 encoding for the three bytes of data Finally, the encoded data is 4 characters, that is, the 3-byte data needs to be represented by 4 printable characters whe...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

Embodiments of the invention provide an encoding method, a decoding method, an encoding device and a decoding device. The encoding method comprises the following steps: acquiring to-be-encoded data, wherein the to-be-encoded data is a binary character string; and encoding the to-be-encoded data according to base-64 encoding rules to get encoding data corresponding to the to-be-encoded data, wherein the encoding data is a base-64 encoding character string, and the 64 encoding rules employ the following 64 characters: 0-9, @, A to Z, _, and a to z. On the basis of shortening the length of the to-be-encoded data and saving the storage space, the encoding method in the embodiment of the invention is of higher compatibility because all the characters in the character set employed by the encoding method can be used as a file name under the Linux operating system and the Windows operating system, and the characters '@' and '_' can be used directly in shell and regular expressions and are compatible with code statements in the common language C / C++ / Java.

Description

technical field [0001] Embodiments of the present invention relate to data communication technologies, and in particular, to an encoding and decoding method, an encoding device, and a decoding device. Background technique [0002] In big data scenarios, applications such as log text and K-means contain a large number of character numbers. Character numbers refer to characters that can be displayed and printed in text and are stored in the form of strings. Character numbers take up more storage space than numeric numbers. For example, the decimal number 255 only needs 1 byte if it is stored as a numeric number, because 1 byte can store 256 different states (0 ~255). If it is stored as a character number, 3 bytes are required. At this time, only 10 states (0-9) are used for each byte, and a large number of states are wasted. [0003] In order to reduce the storage space of character numbers, in the prior art, each character number can store more states by increasing the base...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H03M7/00
CPCH03M7/00
Inventor 岳银亮孟磊冷镇宇熊劲
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products