Data compression method and device for electronic supervision code
An electronic supervision code and data compression technology, applied in the field of data processing, can solve the problem that the printing system is difficult to meet the requirements of high resolution and printing speed of the electronic supervision code, and achieve the effect of high resolution and printing speed
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0021] An embodiment of the present invention provides a data compression method for an electronic supervision code. The execution body of the method is a data compression device for an electronic supervision code. The device can be integrated in the electronic supervision code as a software plug-in, a hardware module or a combination of software and hardware. In the printing system, it can also be used as a data compression device independent of the printing system, located between the printing system and the numerical control system. figure 1 It is a flow chart of the data compression method for the electronic supervisory code provided by Embodiment 1 of the present invention. Such as figure 1 As shown, the method specifically includes the following steps:
[0022] Step S101 , perform run-length compression on the original data to be transmitted; the original data includes: data marking all white and data marking all black.
[0023] Step S102, sending the compressed data t...
Embodiment 2
[0029] This embodiment also provides a data compression method for an electronic supervisory code. Further, in the solution of the above embodiment, the format of the original data is double word (Double Word, DWORD for short).
[0030] figure 2 It is a flow chart of the data compression method for the electronic supervisory code provided by Embodiment 2 of the present invention. Such as figure 2 As shown, in step S101 of the solution of the above embodiment, the original data to be transmitted is subjected to run-length compression, which specifically includes the following steps:
[0031] Step S201, starting from the first address of the original data buffer, and scanning in units of DWORD.
[0032] The so-called DWORD, each word is 2 bytes in length, DWORD is 4 bytes, each byte is 8 bits, that is, each DWORD data in the original data is 32 bits. In order to save storage space and improve readability, 32 bits in DWORD can be represented by 1 hexadecimal data every 4 bi...
Embodiment 3
[0055] This embodiment also provides a data compression method for an electronic supervisory code, which is explained through specific examples. image 3 It is a flow chart of the data compression method for the electronic supervisory code provided by Embodiment 3 of the present invention. Such as image 3 As shown, the method specifically includes the following:
[0056] Step S301, starting from the first address of the original data buffer, and scanning in units of DWORD.
[0057] Step S302, if the current DWORD value scanned is zero, add one to the number of data marked all white.
[0058] Step S303, when non-zero value data is scanned in the current DWROD, and the number of data marked all white is greater than the threshold value of the number of all white data, create a new DWORD data as the first control code, which is used to indicate that the mark is all white data information.
[0059] Step S304, when non-zero value data is scanned in the current DWROD, add one t...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


