Method for compressing decompressed data volume

By performing specific initialization and setting operations on the decompressed data body, the problem of lack of data body compression method in the prior art is solved, and low-cost data recovery of Western Digital hard disk is realized, avoiding user data loss.

CN119166422APending Publication Date: 2024-12-20XLY SALVATIONDATA TECHNOLOGY INC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411295853.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The prior art lacks a method of compressing the decompressed data body, resulting in the failure of Marvell master Western Digital hard disk, resulting in the loss of user data.

Method used

Through a series of initialization and setting data steps, including copying, offset, judgment and assignment operations, the compression of the decompressed data body is realized, and the ROM file can be generated that can be used to repair the failed hard disk.

Benefits of technology

No additional hardware equipment is required, and the faulty hard disk is recovered at a low cost, solving the technical gap in understanding compressed data body compression, and realizing data recovery of Marvell's master Western Digital hard disk.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166422A_ABST
    Figure CN119166422A_ABST
Patent Text Reader

Abstract

The invention discloses a method for compressing a decompressed data volume, which is characterized in that a management head and a data volume in an ROM (Read Only Memory) file of a West Digital Marvell hard disk are acquired, a decryption data volume set of the ROM file of the West Digital Marvell hard disk is acquired, and the decompressed data volume is compressed by adopting a first method to a fifth method provided by the invention. The method is used for repairing the ROM file required by the fault hard disk, so that the aim of recovering the western digital hard disk of the Marvell master control is fulfilled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of information security and data recovery, and relates to data body compression in a ROM file of a Western Digital hard disk, and in particular to a method for compressing a decompressed data body. Background Art

[0002] Hard disks are highly complex and sophisticated devices that combine electromagnetic, mechanical and electronic technologies to store information at very high density. Hard disk technology has made the development of personal computers, movies on demand, digital video recorders (DVRs) and digital music jukeboxes possible, and has greatly promoted the popularity of digital cameras and camcorders. In addition, all the information on the Internet can be stored on hard disks.

[0003] Western Digital is the leader in the data storage industry and the hard disk industry. Western Digital hard disks also have a large market share. Among them, Marvell has always been the leader in the field of master control, the king of the SATA era, with good performance and stability. The market share of Western Digital hard disks using Marvell master control is also very high.

[0004] However, since the Western Digital hard disk controlled by Marvell cannot read and write data after a failure, if the failed hard disk cannot be restored, user data will be lost. However, to repair the failed hard disk, the ROM file of the hard disk must be obtained, and the valid data part of the ROM file is the management header and data body. Among them, some ROM files are locked ROM files. If they cannot be unlocked, even if the management header and data body in the ROM file are obtained, the failed hard disk cannot be repaired.

[0005] The invention application entitled "A method for obtaining a management header and a data body in a ROM file", application number 202311580695.0, and application date November 24, 2023 discloses a method for obtaining a management header and a data body in a ROM file. However, after obtaining the management header and the data body, the decompressed data body needs to be recompressed, otherwise, the ROM file required to repair the faulty hard disk cannot be updated and reconstructed, and thus the Western Digital hard disk controlled by Marvell cannot be restored.

[0006] In the prior art, there is no method for compressing decompressed data for a Western Digital hard disk controlled by Marvell. Summary of the invention

[0007] In view of the existing technical problems, the present application provides a method for compressing a decompressed data body to repair the ROM file required by a faulty hard disk, thereby achieving the purpose of restoring a Western Digital hard disk controlled by Marvell.

[0008] This application incorporates the entire contents of the invention application entitled "A method for obtaining management headers and data bodies in ROM files", application number 202311580695.0, and application date November 24, 2023, and the invention application entitled "A method for obtaining a decrypted data body set in a ROM file in a Western Digital Marvell hard drive", application number 202410475841.1, and application date April 19, 2024 into this invention application by reference.

[0009] The method provided in this application comprises the following steps:

[0010] S100: Initialize data, set data, input source data and source data byte length, where:

[0011] The source data is obtained by using a method of obtaining a decrypted data volume set of a ROM file in a Western Digital Marvell hard disk;

[0012] Initializing data includes: initializing target data, the target index is used as the offset of the target data and is assigned an initial value of 0;

[0013] Use the target index as the offset, the starting address of the target data as the first address, shift backward and assign the addressed 4-byte content to the source data byte length, and the target index is incremented by 4;

[0014] Initializing data also includes initializing the following data:

[0015] data i, data h, data l, data m, data n, data j, data k, data x,

[0016] Data y;

[0017] Setting data includes setting the following data:

[0018] data a, data b, data c, data d, data e, data f, data g;

[0019] S200: copy the contents of source data 0x00 byte to 0x3C byte to data d with the starting address 0xFC4;

[0020] The sum of 0x1001 and the source data 0x00 bytes multiplied by 4 is used as the offset. The starting address of data b is used as the first address, and the addressing continuous 4 bytes are offset backward and assigned to 0xFC4.

[0021] Take the starting address of data c as the first address, shift backward 0x3F10 bytes and assign the addressed 4-byte content to the sum of 0x1001 plus the content of 0x00 bytes of the source data;

[0022] S300: Determine whether data m is greater than data i, if yes, execute step S400, otherwise, execute step S500;

[0023] S400: the value of data i is assigned to data m;

[0024] S500: Determine whether the data m is greater than 2, if yes, execute step S600, otherwise, execute step S700;

[0025] S600: adopt the first method and the input data Ia is equal to the data n, and execute step S800;

[0026] The second method is used and the input data II-a is assigned the value of data m plus 0xFD;

[0027] S700: Using data j as the offset and the starting address of data d as the first address, shift backward and assign the content of the addressed 1 byte to the input data Ia, and then use the first method;

[0028] S800: Determine whether the data h is less than the data m and the data k is greater than 0. If so, execute step S900; otherwise, execute step SC00;

[0029] S900: data k is decremented by 1;

[0030] Take data l as the offset, the starting address of the source data as the first address, shift backward and assign the addressed 1-byte content to data p;

[0031] Take data o as the offset, the starting address of data d as the first address, shift backward and assign the addressed 1-byte content to data p;

[0032] Data l is incremented by 1;

[0033] SA00: Determine whether the data o is less than 0x3B. If so, execute step SB00; otherwise, execute step SC00.

[0034] SB00: Use the sum of data o and 0x1000 as the offset, the starting address of data d as the first address, shift backward and assign the addressed 1-byte content to data p;

[0035] The sum of data o plus 1 is ANDed with 0xFFF, and the result is assigned to data o;

[0036] The sum of data j plus 1 is ANDed with 0xFFF, and the result is assigned to data j;

[0037] The third method is adopted and the input data III-a is assigned as data j;

[0038] Data h is incremented by 1;

[0039] SC00: Determine whether data h is less than data m. If so, execute step SD00; otherwise, execute step SH00;

[0040] SD00: The sum of data o plus 1 is ANDed with 0xFFF, and the result is assigned to data o;

[0041] The sum of data j plus 1 is ANDed with 0xFFF, and the result is assigned to data j;

[0042] Data i is decremented by 1;

[0043] SE00: Determine whether the data i is not equal to 0. If so, execute step SF00; otherwise, execute step SG00;

[0044] SF00: adopt the third method and assign the input data III-a to data j;

[0045] SG00: data h is incremented by 1;

[0046] SH00: Determine whether data i is equal to 0. If yes, execute step SJ00; otherwise, execute step S800;

[0047] SJ00: Determine whether the data x is equal to 0x80000000, if yes, execute step SL00, otherwise, execute step SK00;

[0048] SK00: Use the target index as the offset, the starting address of the target data as the first address, shift backward and assign the addressed continuous 4-byte content to data y;

[0049] The target index is incremented by 4;

[0050] Data x is assigned a value of 0x80000000, and data y is assigned a value of 0;

[0051] SL00: Output target index as the byte length of the compressed data body; output target data as the compressed data body.

[0052] Preferably, initializing data includes the following steps:

[0053] Data i is assigned a value of 0x3C;

[0054] Data h, data o, data m, data n, and data y are all assigned a value of 0;

[0055] Data l is assigned a value of 0x3C;

[0056] Data j is assigned the value 0xFC4;

[0057] The value of data k is the byte length of the source data minus 0x3C;

[0058] Data x is assigned a value of 0x80000000.

[0059] Preferably, setting data includes the following steps:

[0060] A. Setting data a to generate auxiliary operations for encrypted data includes the following steps:

[0061] A0: Both subscript a and subscript b are initialized to 0;

[0062] A1: Take the product of the subscript a and 4 as the offset, take the starting address of data a as the first address, shift backward and assign the addressed 4-byte content to 1;

[0063] Take the product of 0x1884 plus the sum of subscript a and 4 as the offset, take the starting address of data a as the first address, shift backward and assign the addressed 4-byte content to the sum of subscript a plus 0x273;

[0064] The offset is the product of 0x139C plus subscript a multiplied by 4, the starting address of data a is used as the first address, and the continuous 4 bytes addressed are offset backward and assigned to subscript a;

[0065] A2: Subscript a is incremented by 1;

[0066] A3: Determine whether the subscript a is not equal to 0x13A. If so, execute step A1; otherwise, execute step A4.

[0067] A4: Subscript a is assigned a value of 0x13A;

[0068] A5: Set data a:

[0069] Take the product of the subscript b multiplied by 4 as the offset, take the starting address of data a as the first address, shift backward and obtain the continuous 4 bytes of the addressed content as the addend;

[0070] Take the product of the sum of the subscript b plus 1 and 4 as the offset, take the starting address of data a as the first address, shift backward and obtain the continuous 4 bytes of the addressed content as the addend;

[0071] Take the product of the subscript a multiplied by 4 as the offset, take the starting address of data a as the first address, shift backward and assign the addressed 4-byte content to the sum of the addend and the augend;

[0072] The offset is the sum of 0x1884 and subscript a multiplied by 4, the starting address of data a is used as the first address, the offset is moved backward and the addressed 4-byte content is assigned as subscript b;

[0073] The offset is the sum of 0x9D0 and subscript b multiplied by 4, the starting address of data a is used as the first address, and the continuous 4 bytes addressed are offset backward and assigned to subscript a;

[0074] The product of 0x9D4 plus subscript b multiplied by 4 is used as the offset, the starting address of data a is used as the first address, and the continuous 4 bytes addressed are offset backward and assigned to subscript a;

[0075] A6: Subscript a increases by 1, and subscript b increases by 2;

[0076] A7: Determine whether the subscript a is less than or equal to 0x272. If so, execute step A5; otherwise, execute step A8.

[0077] A8: Take the starting address of data a as the first address, shift 0x9CC bytes backward and assign the addressed 4-byte content to 0x7FFFFFFF;

[0078] Take the starting address of data a as the first address, shift backward 0x1398 bytes and assign the addressed 4-byte content to 0x0;

[0079] Output data a;

[0080] B. Setting data b to generate auxiliary operations for encrypted data includes the following steps:

[0081] B0: The subscript a is initialized to 0x1001;

[0082] B1: Use the product of the subscript a and 4 as the offset, the starting address of data b as the first address, shift backward and assign the addressed 4-byte content to 0x1000;

[0083] B2: Subscript a is incremented by 1;

[0084] B3: Determine whether the subscript a is not equal to 0x1101. If so, execute step A1. Otherwise, end the setting process of data b and output data b.

[0085] C. Setting data c to generate auxiliary operations for encrypted data includes the following steps:

[0086] C0: The subscript a is initialized to 0x0;

[0087] C1: Use the product of the subscript a and 4 as the offset, the starting address of data c as the first address, shift backward and assign the addressed 4-byte content to 0x1000;

[0088] C2: subscript a is incremented by 1;

[0089] C3: Determine whether the subscript a is not equal to 0x1000. If so, execute step C1. Otherwise, end the setting process of data c and output data c.

[0090] D. Setting data d to temporarily store data, from which values ​​are taken when calculating encrypted data, including the following steps:

[0091] Set the byte length of data d to 0x103C bytes, and fill in 0xFC4 0x20s consecutively from the first address;

[0092] E. Set data f and data g: Get data f and data g from PC-3000Portable-III 003396 software to generate auxiliary operations for encrypted data.

[0093] Preferably, the first method comprises the following steps:

[0094] I-1: Input data and assign initial values:

[0095] Input data Ia, data Ib, and data Ic are all initialized to 0;

[0096] I-2: Use the product of Ia multiplied by 4 plus 0x139C as the offset, use the starting address of data a as the first address, offset backward and obtain the addressed continuous 4-byte content and assign it to data Id;

[0097] I-3: data Ib is shifted right by 1 bit;

[0098] I-4: Determine whether the result of the AND operation between the data Id and 0x01 is equal to 0x01. If yes, execute step I-5; otherwise, execute step I-6;

[0099] I-5: Data Ib is incremented by 0x80000000;

[0100] I-6: Data Ic is incremented by 1;

[0101] I-7: Use the product of Id multiplied by 4 plus 0x9D0 as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content and assign it to data Id;

[0102] I-8: Determine whether the data ID is equal to 0x272. If so, execute step I-9; otherwise, execute step I-7.

[0103] I-9: Use the fourth method and assign the input data IV-a to data Id, and the input data IV-b to data Ib;

[0104] IA: The fifth method is adopted and the input data Va is assigned to data Ia.

[0105] Preferably, the second method comprises the following steps:

[0106] II-1: Input data II-a;

[0107] II-2: Generate data IV-a: Shift the value of data II-a right by 6 bits to generate the value as the offset, take the starting address of data f as the first address, shift backward and assign the content of the 1-byte addressed to data IV-a;

[0108] II-3: Generate data IV-b: Shift the value of data II-a right by 6 bits to generate the value as the offset, take the starting address of data g as the first address, shift backward and obtain the content of the addressed 1 byte, and assign the value generated by shifting the obtained 1 byte content left by 24 bits to data IV-b;

[0109] II-4: Use the current data IV-a and data IV-b and execute the fourth method;

[0110] II-5: Generate data IV-a again: assign data IV-a to 0x06;

[0111] II-6: Generate data IV-b again: the result of performing AND operation on data II-a and 0x3F, and then left shifting 0x1A bits to generate the value, and assigning the generated value to data IV-b;

[0112] II-7: Use the current data IV-a and data IV-b to execute the fourth method.

[0113] Preferably, the third method comprises the following steps:

[0114] III-1: Input data III-a;

[0115] III-2: With data III-a as the offset and the starting address of data d as the first address, it shifts backward and obtains the addressed 1-byte content, and the sum of the obtained 1-byte content plus 0x1001 is assigned to data III-b;

[0116] III-3: Data III-c is initialized to 1;

[0117] III-4: Using the sum of data III-a and data III-c as the offset, and the starting address of data d as the first address, shift backward and obtain the addressed 1-byte content and assign it to data III-d;

[0118] Using the sum of data III-b and data III-c as the offset, using the starting address of data d as the first address, shift backward and obtain the addressed 1-byte content and assign it to data III-e;

[0119] III-5: Determine whether data III-d is equal to data III-e, if yes, execute step III-6, otherwise, execute step III-8;

[0120] III-6: Data III-c is incremented by 1;

[0121] III-7: Determine whether data III-c is equal to 0x3B. If so, execute step III-8; otherwise, execute step III-4;

[0122] III-8: Determine whether data III-d is equal to data III-e. If so, execute step III-9; otherwise, execute step III-A.

[0123] III-9: Data III-c is assigned the value 0x3C;

[0124] III-A: Determine whether data III-c is greater than data m. If so, execute step III-B.

[0125] Otherwise, the process of the third method ends;

[0126] III-B: The difference between data III-a and data III-b is ANDed with 0xFFF, and then the difference is subtracted from 0x01, which is assigned to data n, and the current data III-c is assigned to data m.

[0127] Preferably, the fourth method comprises the following steps:

[0128] IV-1: Input data IV-a, data IV-b, and assign data IV-c to 0x80000000;

[0129] IV-2: Perform an AND operation on data IV-c and data IV-b to determine whether the result of the AND operation is equal to 0. If so, execute step IV-4; otherwise, execute step IV-3.

[0130] IV-3: The result of the OR operation of data x and data y is assigned to data y;

[0131] IV-4: Data IV-c is shifted right by 1 bit, and data x is shifted right by 1 bit;

[0132] IV-5: Determine whether the data x is equal to 0, if yes, execute step IV-6, otherwise, execute step IV-7;

[0133] IV-6: Use the target index as the offset, the starting address of the target data as the first address, offset backward and address the continuous 4-byte content, and assign the addressed 4-byte content to data y;

[0134] Data x is assigned a value of 0x80000000, and data y is assigned a value of 0;

[0135] IV-7: Data IV-a is decremented by 1;

[0136] IV-8: Determine whether data IV-a is equal to 0, if yes, execute step IV-9, otherwise, execute step IV-2;

[0137] IV-9: End the process of the fourth method.

[0138] Preferably, the fifth method comprises the following steps:

[0139] V-0: input data Va;

[0140] V-1: Take the product of data Va multiplied by 4 and the sum of 0x139C as the offset, take the starting address of data a as the first address, shift backward and obtain the continuous 4-byte content, and assign the obtained 4-byte content to data Va;

[0141] V-2: Use the product of data Va multiplied by 4 as the offset, the starting address of data a as the first address, shift backward and add 1 to the continuous 4-byte content, and assign the result of adding 1 to the continuous 4-byte content to data Vb;

[0142] V-3: Use the product of the sum of data Va plus 1 and 4 as the offset, the starting address of data a as the first address, and shift backward to obtain the addressed continuous 4-byte content;

[0143] V-4: Determine whether the data Vb is greater than the 4-byte content obtained in step V-3. If so, execute step V-5; otherwise, execute step V-9;

[0144] V-5: the sum of data Va plus 2 is assigned to data Vc;

[0145] V-6: Use the product of data Vc multiplied by 4 as the offset, the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0146] V-7: Determine whether the data Vb is greater than the 4-byte content obtained in step V-6. If so, execute step V-8; otherwise, execute step V-9;

[0147] V-8: Data Vc is incremented by 1, and step V-6 is executed;

[0148] V-9: data Vc is decremented by 1;

[0149] VA: Perform the first swap:

[0150] VA-1: Use the product of data Va multiplied by 4 as the offset, the starting address of data a as the first address, and shift backward to obtain the addressed continuous 4-byte content;

[0151] VA-2: Use the product of data Vc multiplied by 4 as the offset, the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0152] VA-3: For data a, swap the consecutive 4-byte contents obtained in step VA-1 and step VA-2;

[0153] VB: Perform the second swap:

[0154] VB-1: Use the product of data Va multiplied by 4 plus 0x139C as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0155] VB-2: Use the product of data Vc multiplied by 4 plus 0x139C as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0156] VB-3: For data a, swap the consecutive 4-byte contents obtained in step VB-1 and step VB-2;

[0157] VC: Execute the third swap:

[0158] VC-1: The product of data Va multiplied by 4 plus 0x1884 is used as the offset, and the starting address of data a is used as the first address. The address is shifted backward to obtain the continuous 4-byte content;

[0159] VC-2: Use the product of data Vc multiplied by 4 plus 0x1884 as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0160] VC-3: For data a, swap the consecutive 4-byte contents obtained in steps VC-1 and VC-2;

[0161] VD: Assign data Va to data Vc;

[0162] VE: Take the product of data Va multiplied by 4 plus 0x9D0 as the offset, take the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content, and assign the obtained 4-byte content to data Va;

[0163] VF: Determine whether the data Va is not equal to 0. If so, execute step V-2; otherwise, execute step VG;

[0164] VG: End of the fifth method process.

[0165] The present invention has the following beneficial effects:

[0166] 1. No additional hardware equipment is required, and the cost of recovering a failed hard drive is low.

[0167] 2. The technical problem that there is no method for compressing decompressed data in the prior art is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0168] Figure 1 It is a flow chart of a method for compressing a decompressed data body provided by the present invention;

[0169] Figure 2 is a flow chart of the third method of the present invention;

[0170] Figure 3 It is a flow chart of the fifth method in the present invention. DETAILED DESCRIPTION

[0171] The present invention is described by taking a Western Digital hard disk controlled by Marvell as an example. The definitions of the terms that may be used in this application are as follows:

[0172] For example, the application document describes "backward offset 0x3F10". In this case, the hexadecimal number is the unit of the address, starting from 0x00. For example, the 0x1F byte is the 32nd byte.

[0173] Figure 1 A flow chart of a method for compressing a decompressed data body provided by the present invention is shown.

[0174] like Figure 1 As shown, the method comprises the following steps:

[0175] S100: Initialize data, set data, input source data and source data byte length, where:

[0176] The source data is obtained by using a method of obtaining a decrypted data volume set of a ROM file in a Western Digital Marvell hard disk;

[0177] This application is entitled "A method for obtaining a management header and data body in a ROM file", with application number 202311580695.0 and application date November 24, 2023, and the invention application entitled "A method for obtaining a decrypted data body set of a ROM file in a Western Digital Marvell hard drive",

[0178] The entire contents of the invention application with application number 202410475841.1 and application date April 19, 2024 are incorporated into this invention application by reference.

[0179] For the steps of obtaining source data, please refer to the invention application entitled "A method for obtaining management headers and data bodies in ROM files" and the invention application entitled "A method for obtaining a decrypted data body set of ROM files in Western Digital Marvell hard drives", which will not be repeated here.

[0180] Initializing data includes: initializing target data, the target index is used as the offset of the target data and is assigned an initial value of 0;

[0181] Use the target index as the offset, the starting address of the target data as the first address, shift backward and assign the addressed 4-byte content to the source data byte length, and the target index is incremented by 4;

[0182] Initializing data also includes initializing the following data:

[0183] data i, data h, data l, data m, data n, data j, data k, data x, data y;

[0184] Specifically, initializing data includes the following steps:

[0185] Data i is assigned a value of 0x3C;

[0186] Data h, data o, data m, data n, and data y are all assigned a value of 0;

[0187] Data l is assigned a value of 0x3C;

[0188] Data j is assigned the value 0xFC4;

[0189] The value of data k is the byte length of the source data minus 0x3C;

[0190] Data x is assigned a value of 0x80000000.

[0191] Setting data includes setting the following data:

[0192] data a, data b, data c, data d, data e, data f, data g;

[0193] Specifically, setting data includes the following steps:

[0194] A. Setting data a to generate auxiliary operations for encrypted data includes the following steps:

[0195] A0: Both subscript a and subscript b are initialized to 0;

[0196] A1: Take the product of the subscript a and 4 as the offset, take the starting address of data a as the first address, shift backward and assign the addressed 4-byte content to 1;

[0197] Take the product of 0x1884 plus the sum of subscript a and 4 as the offset, take the starting address of data a as the first address, shift backward and assign the addressed 4-byte content to the sum of subscript a plus 0x273;

[0198] The offset is the product of 0x139C plus subscript a multiplied by 4, the starting address of data a is used as the first address, and the continuous 4 bytes addressed are offset backward and assigned to subscript a;

[0199] A2: Subscript a is incremented by 1;

[0200] A3: Determine whether the subscript a is not equal to 0x13A. If so, execute step A1; otherwise, execute step A4.

[0201] A4: Subscript a is assigned a value of 0x13A;

[0202] A5: Set data a:

[0203] Take the product of the subscript b multiplied by 4 as the offset, take the starting address of data a as the first address, shift backward and obtain the continuous 4 bytes of the addressed content as the addend;

[0204] Take the product of the sum of the subscript b plus 1 and 4 as the offset, take the starting address of data a as the first address, shift backward and obtain the continuous 4 bytes of the addressed content as the addend;

[0205] Take the product of the subscript a multiplied by 4 as the offset, take the starting address of data a as the first address, shift backward and assign the addressed 4-byte content to the sum of the addend and the augend;

[0206] The offset is the sum of 0x1884 and subscript a multiplied by 4, the starting address of data a is used as the first address, the offset is moved backward and the addressed 4-byte content is assigned as subscript b;

[0207] The product of 0x9D0 plus subscript b multiplied by 4 is used as the offset, the starting address of data a is used as the first address, and the continuous 4 bytes addressed are offset backward and assigned to subscript a;

[0208] The product of 0x9D4 plus subscript b multiplied by 4 is used as the offset, the starting address of data a is used as the first address, and the continuous 4 bytes addressed are offset backward and assigned to subscript a;

[0209] A6: Subscript a increases by 1, and subscript b increases by 2;

[0210] A7: Determine whether the subscript a is less than or equal to 0x272. If so, execute step A5; otherwise, execute step A8.

[0211] A8: Take the starting address of data a as the first address, shift 0x9CC bytes backward and assign the addressed 4-byte content to 0x7FFFFFFF;

[0212] Take the starting address of data a as the first address, shift backward 0x1398 bytes and assign the addressed 4-byte content to 0x0;

[0213] Output data a;

[0214] B. Setting data b to generate auxiliary operations for encrypted data includes the following steps:

[0215] B0: The subscript a is initialized to 0x1001;

[0216] B1: Use the product of the subscript a and 4 as the offset, the starting address of data b as the first address, shift backward and assign the addressed 4-byte content to 0x1000;

[0217] B2: Subscript a is incremented by 1;

[0218] B3: Determine whether the subscript a is not equal to 0x1101. If so, execute step A1. Otherwise, end the setting process of data b and output data b.

[0219] C. Setting data c to generate auxiliary operations for encrypted data includes the following steps:

[0220] C0: The subscript a is initialized to 0x0;

[0221] C1: Use the product of the subscript a and 4 as the offset, the starting address of data c as the first address, shift backward and assign the addressed 4-byte content to 0x1000;

[0222] C2: subscript a is incremented by 1;

[0223] C3: Determine whether the subscript a is not equal to 0x1000. If so, execute step C1. Otherwise, end the setting process of data c and output data c.

[0224] D. Setting data d to temporarily store data, from which values ​​are taken when calculating encrypted data, including the following steps:

[0225] Set the byte length of data d to 0x103C bytes, and fill in 0xFC4 0x20s consecutively from the first address;

[0226] E. Set data f and data g: Get data f and data g from PC-3000Portable-III 003396 software to generate auxiliary operations for encrypted data.

[0227] S200: copy the contents of source data 0x00 byte to 0x3C byte to data d with the starting address 0xFC4;

[0228] The sum of 0x1001 and the source data 0x00 bytes multiplied by 4 is used as the offset. The starting address of data b is used as the first address, and the addressing continuous 4 bytes are offset backward and assigned to 0xFC4.

[0229] Take the starting address of data c as the first address, shift backward 0x3F10 bytes and assign the addressed 4-byte content to the sum of 0x1001 plus the content of 0x00 bytes of the source data;

[0230] S300: Determine whether data m is greater than data i, if yes, execute step S400, otherwise, execute step S500;

[0231] S400: the value of data i is assigned to data m;

[0232] S500: Determine whether the data m is greater than 2, if yes, execute step S600, otherwise, execute step S700;

[0233] S600: adopt the first method and the input data Ia is equal to the data n, and execute step S800; wherein the first method includes the following steps:

[0234] I-1: Input data and assign initial values:

[0235] Input data Ia, data Ib, and data Ic are all initialized to 0;

[0236] I-2: Use the product of Ia multiplied by 4 plus 0x139C as the offset, use the starting address of data a as the first address, offset backward and obtain the addressed continuous 4-byte content and assign it to data Id;

[0237] I-3: data Ib is shifted right by 1 bit;

[0238] I-4: Determine whether the result of the AND operation between the data Id and 0x01 is equal to 0x01. If yes, execute step I-5; otherwise, execute step I-6;

[0239] I-5: Data Ib is incremented by 0x80000000;

[0240] I-6: Data Ic is incremented by 1;

[0241] I-7: Use the product of Id multiplied by 4 plus 0x9D0 as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content and assign it to data Id;

[0242] I-8: Determine whether the data ID is equal to 0x272. If so, execute step I-9; otherwise, execute step I-7.

[0243] I-9: Using the fourth method and assigning the input data IV-a to data Id and the input data IV-b to data Ib; wherein,

[0244] The fourth method comprises the following steps:

[0245] IV-1: Input data IV-a, data IV-b, and assign data IV-c to 0x80000000;

[0246] IV-2: Perform an AND operation on data IV-c and data IV-b to determine whether the result of the AND operation is equal to 0. If so, execute step IV-4; otherwise, execute step IV-3.

[0247] IV-3: The result of the OR operation of data x and data y is assigned to data y;

[0248] IV-4: Data IV-c is shifted right by 1 bit, and data x is shifted right by 1 bit;

[0249] IV-5: Determine whether the data x is equal to 0, if yes, execute step IV-6, otherwise, execute step IV-7;

[0250] IV-6: Use the target index as the offset, the starting address of the target data as the first address, offset backward and address the continuous 4-byte content, and assign the addressed 4-byte content to data y;

[0251] Data x is assigned a value of 0x80000000, and data y is assigned a value of 0;

[0252] IV-7: Data IV-a is decremented by 1;

[0253] IV-8: Determine whether data IV-a is equal to 0, if yes, execute step IV-9, otherwise, execute step IV-2;

[0254] IV-9: End the process of the fourth method.

[0255] IA: The fifth method is adopted and the input data Va is assigned to data Ia.

[0256] Figure 3 FIG. 5 shows a flow chart of the fifth method of the present invention. Figure 3 As shown, the fifth method includes the following steps:

[0257] V-0: input data Va;

[0258] V-1: Take the product of data Va multiplied by 4 and the sum of 0x139C as the offset, take the starting address of data a as the first address, shift backward and obtain the continuous 4-byte content, and assign the obtained 4-byte content to data Va;

[0259] V-2: Use the product of data Va multiplied by 4 as the offset, the starting address of data a as the first address, shift backward and add 1 to the continuous 4-byte content, and assign the result of adding 1 to the continuous 4-byte content to data Vb;

[0260] V-3: Use the product of the sum of data Va plus 1 and 4 as the offset, the starting address of data a as the first address, and shift backward to obtain the addressed continuous 4-byte content;

[0261] V-4: Determine whether the data Vb is greater than the 4-byte content obtained in step V-3. If so, execute step V-5; otherwise, execute step V-9;

[0262] V-5: the sum of data Va plus 2 is assigned to data Vc;

[0263] V-6: Use the product of data Vc multiplied by 4 as the offset, the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0264] V-7: Determine whether the data Vb is greater than the 4-byte content obtained in step V-6. If so, execute step V-8; otherwise, execute step V-9;

[0265] V-8: Data Vc is incremented by 1, and step V-6 is executed;

[0266] V-9: data Vc is decremented by 1;

[0267] VA: Perform the first swap:

[0268] VA-1: Use the product of data Va multiplied by 4 as the offset, the starting address of data a as the first address, and shift backward to obtain the addressed continuous 4-byte content;

[0269] VA-2: Use the product of data Vc multiplied by 4 as the offset, the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0270] VA-3: For data a, swap the consecutive 4-byte contents obtained in step VA-1 and step VA-2;

[0271] VB: Perform the second swap:

[0272] VB-1: Use the product of data Va multiplied by 4 plus 0x139C as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0273] VB-2: Use the product of data Vc multiplied by 4 plus 0x139C as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0274] VB-3: For data a, swap the consecutive 4-byte contents obtained in step VB-1 and step VB-2;

[0275] VC: Execute the third swap:

[0276] VC-1: The product of data Va multiplied by 4 plus 0x1884 is used as the offset, and the starting address of data a is used as the first address. The address is shifted backward to obtain the continuous 4-byte content;

[0277] VC-2: Use the product of data Vc multiplied by 4 plus 0x1884 as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content;

[0278] VC-3: For data a, swap the consecutive 4-byte contents obtained in steps VC-1 and VC-2;

[0279] VD: Assign data Va to data Vc;

[0280] VE: Take the product of data Va multiplied by 4 plus 0x9D0 as the offset, take the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content, and assign the obtained 4-byte content to data Va;

[0281] VF: Determine whether the data Va is not equal to 0. If so, execute step V-2; otherwise, execute step VG;

[0282] VG: End of the fifth method process.

[0283] The second method is adopted and the input data II-a is assigned the value of data m plus 0xFD; wherein the second method includes the following steps:

[0284] II-1: Input data II-a;

[0285] II-2: Generate data IV-a: Shift the value of data II-a right by 6 bits to generate the value as the offset, take the starting address of data f as the first address, shift backward and assign the content of the 1-byte addressed to data IV-a;

[0286] II-3: Generate data IV-b: Shift the value of data II-a right by 6 bits to generate the value as the offset, take the starting address of data g as the first address, shift backward and obtain the content of the addressed 1 byte, and assign the value generated by shifting the obtained 1 byte content left by 24 bits to data IV-b;

[0287] II-4: Use the current data IV-a and data IV-b and execute the fourth method;

[0288] II-5: Generate data IV-a again: assign data IV-a to 0x06;

[0289] II-6: Generate data IV-b again: the result of performing AND operation on data II-a and 0x3F, and then left shifting 0x1A bits to generate the value, and assigning the generated value to data IV-b;

[0290] II-7: Use the current data IV-a and data IV-b to execute the fourth method.

[0291] S700: Using data j as the offset and the starting address of data d as the first address, shift backward and assign the content of the addressed 1 byte to the input data Ia, and then use the first method;

[0292] S800: Determine whether the data h is less than the data m and the data k is greater than 0. If so, execute step S900; otherwise, execute step SC00;

[0293] S900: data k is decremented by 1;

[0294] Take data l as the offset, the starting address of the source data as the first address, shift backward and assign the addressed 1-byte content to data p;

[0295] Take data o as the offset, the starting address of data d as the first address, shift backward and assign the addressed 1-byte content to data p;

[0296] Data l is incremented by 1;

[0297] SA00: Determine whether the data o is less than 0x3B. If so, execute step SB00; otherwise, execute step SC00.

[0298] SB00: Use the sum of data o and 0x1000 as the offset, the starting address of data d as the first address, shift backward and assign the addressed 1-byte content to data p;

[0299] The sum of data o plus 1 is ANDed with 0xFFF, and the result is assigned to data o;

[0300] The sum of data j plus 1 is ANDed with 0xFFF, and the result is assigned to data j;

[0301] The third method is adopted and the input data III-a is assigned as data j.

[0302] Figure 2 FIG. 4 shows a flow chart of the third method in the present invention. Figure 3 As shown, the third method includes the following steps:

[0303] III-1: Input data III-a;

[0304] III-2: With data III-a as the offset and the starting address of data d as the first address, it shifts backward and obtains the addressed 1-byte content, and the sum of the obtained 1-byte content plus 0x1001 is assigned to data III-b;

[0305] III-3: Data III-c is initialized to 1;

[0306] III-4: Using the sum of data III-a and data III-c as the offset, and the starting address of data d as the first address, shift backward and obtain the addressed 1-byte content and assign it to data III-d;

[0307] Using the sum of data III-b and data III-c as the offset, using the starting address of data d as the first address, shift backward and obtain the addressed 1-byte content and assign it to data III-e;

[0308] III-5: Determine whether data III-d is equal to data III-e, if yes, execute step III-6, otherwise, execute step III-8;

[0309] III-6: Data III-c is incremented by 1;

[0310] III-7: Determine whether data III-c is equal to 0x3B. If so, execute step III-8; otherwise, execute step III-4;

[0311] III-8: Determine whether data III-d is equal to data III-e. If so, execute step III-9; otherwise, execute step III-A.

[0312] III-9: Data III-c is assigned the value 0x3C;

[0313] III-A: Determine whether data III-c is greater than data m. If so, execute step III-B. Otherwise, end the process of the third method.

[0314] III-B: The difference between data III-a and data III-b is ANDed with 0xFFF, and then the difference is subtracted from 0x01, and assigned to data n, and the current data III-c is assigned to data m;

[0315] Data h is incremented by 1;

[0316] SC00: Determine whether data h is less than data m. If so, execute step SD00; otherwise, execute step SH00;

[0317] SD00: The sum of data o plus 1 is ANDed with 0xFFF, and the result is assigned to data o;

[0318] The sum of data j plus 1 is ANDed with 0xFFF, and the result is assigned to data j;

[0319] Data i is decremented by 1;

[0320] SE00: Determine whether the data i is not equal to 0. If so, execute step SF00; otherwise, execute step SG00;

[0321] SF00: adopt the third method and assign the input data III-a to data j;

[0322] SG00: data h is incremented by 1;

[0323] SH00: Determine whether data i is equal to 0. If yes, execute step SJ00; otherwise, execute step S800;

[0324] SJ00: Determine whether the data x is equal to 0x80000000, if yes, execute step SL00, otherwise, execute step SK00;

[0325] SK00: Use the target index as the offset, the starting address of the target data as the first address, shift backward and assign the addressed continuous 4-byte content to data y;

[0326] The target index is incremented by 4;

[0327] Data x is assigned a value of 0x80000000, and data y is assigned a value of 0;

[0328] SL00: Output target index as the byte length of the compressed data body; output target data as the compressed data body.

[0329] It should be understood that the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for compressing a decompressed data body, characterized in that: The following steps are involved: S100: initializing data, setting data, inputting source data and source data byte length, wherein the source data is data obtained by using a method of obtaining a decrypted data body set of a ROM file in a Western Digital Marvell hard disk; Initializing data includes: initializing target data, the target index is used as the offset of the target data and is assigned an initial value of 0; Use the target index as the offset, the starting address of the target data as the first address, shift backward and assign the addressed 4-byte content to the source data byte length, and the target index is incremented by 4; Initializing data also includes initializing the following data: data i, data h, data l, data m, data n, data j, data k, data x, data y; Setting data includes setting the following data: data a, data b, data c, data d, data e, data f, data g; S200: copy the contents of source data 0x00 byte to 0x3C byte to data d with the starting address 0xFC4; The sum of 0x1001 and the source data 0x00 bytes multiplied by 4 is used as the offset. The starting address of data b is used as the first address, and the addressing continuous 4 bytes are offset backward and assigned to 0xFC4. Take the starting address of data c as the first address, shift backward 0x3F10 bytes and assign the addressed 4-byte content to the sum of 0x1001 plus the content of 0x00 bytes of the source data; S300: Determine whether data m is greater than data i, if yes, execute step S400, otherwise, execute step S500; S400: the value of data i is assigned to data m; S500: Determine whether the data m is greater than 2, if yes, execute step S600, otherwise, execute step S700; S600: adopt the first method and the input data Ia is equal to the data n, and execute step S800; The second method is used and the input data II-a is assigned the value of data m plus 0xFD; S700: Using data j as the offset and the starting address of data d as the first address, shift backward and assign the content of the addressed 1 byte to the input data Ia, and then use the first method; S800: Determine whether the data h is less than the data m and the data k is greater than 0. If so, execute step S900; otherwise, execute step SC00; S900: data k is decremented by 1; Take data l as the offset, the starting address of the source data as the first address, shift backward and assign the addressed 1-byte content to data p; Take data o as the offset, the starting address of data d as the first address, shift backward and assign the addressed 1-byte content to data p; Data l is incremented by 1; SA00: Determine whether the data o is less than 0x3B. If so, execute step SB00; otherwise, execute step SC00. SB00: Use the sum of data o and 0x1000 as the offset, the starting address of data d as the first address, shift backward and assign the addressed 1-byte content to data p; The sum of data o plus 1 is ANDed with 0xFFF, and the result is assigned to data o; The sum of data j plus 1 is ANDed with 0xFFF, and the result is assigned to data j; The third method is adopted and the input data III-a is assigned as data j; Data h is incremented by 1; SC00: Determine whether data h is less than data m. If so, execute step SD00; otherwise, execute step SH00; SD00: The sum of data o plus 1 is ANDed with 0xFFF, and the result is assigned to data o; The sum of data j plus 1 is ANDed with 0xFFF, and the result is assigned to data j; Data i is decremented by 1; SE00: Determine whether the data i is not equal to 0. If so, execute step SF00; otherwise, execute step SG00; SF00: adopt the third method and assign the input data III-a to data j; SG00: data h is incremented by 1; SH00: Determine whether data i is equal to 0. If yes, execute step SJ00; otherwise, execute step S800; SJ00: Determine whether the data x is equal to 0x80000000, if yes, execute step SL00, otherwise, execute step SK00; SK00: Use the target index as the offset, the starting address of the target data as the first address, shift backward and assign the addressed continuous 4-byte content to data y; The target index is incremented by 4; Data x is assigned a value of 0x80000000, and data y is assigned a value of 0; SL00: Output target index as the byte length of the compressed data body; output target data as the compressed data body.

2. A method for compressing a decompressed data body according to claim 1, characterized in that: Initializing data includes the following steps: Data i is assigned a value of 0x3C; Data h, data o, data m, data n, and data y are all assigned a value of 0; Data l is assigned a value of 0x3C; Data j is assigned the value 0xFC4; The value of data k is the byte length of the source data minus 0x3C; Data x is assigned a value of 0x80000000.

3. A method for compressing a decompressed data body according to claim 1, characterized in that: Setting up the data involves the following steps: A. Setting data a to generate auxiliary operations for encrypted data includes the following steps: A0: Both subscript a and subscript b are initialized to 0; A1: Take the product of the subscript a and 4 as the offset, take the starting address of data a as the first address, shift backward and assign the addressed 4-byte content to 1; Take the product of 0x1884 plus the sum of subscript a and 4 as the offset, take the starting address of data a as the first address, shift backward and assign the addressed 4-byte content to the sum of subscript a plus 0x273; The offset is the product of 0x139C plus subscript a multiplied by 4, the starting address of data a is used as the first address, and the continuous 4 bytes addressed are offset backward and assigned to subscript a; A2: Subscript a is incremented by 1; A3: Determine whether the subscript a is not equal to 0x13A. If so, execute step A1; otherwise, execute step A4. A4: Subscript a is assigned a value of 0x13A; A5: Set data a: Take the product of the subscript b multiplied by 4 as the offset, take the starting address of data a as the first address, shift backward and obtain the continuous 4 bytes of the addressed content as the addend; Take the product of the sum of the subscript b plus 1 and 4 as the offset, take the starting address of data a as the first address, shift backward and obtain the continuous 4 bytes of the addressed content as the addend; Take the product of the subscript a multiplied by 4 as the offset, take the starting address of data a as the first address, shift backward and assign the addressed 4-byte content to the sum of the addend and the augend; The offset is the sum of 0x1884 and subscript a multiplied by 4, the starting address of data a is used as the first address, the offset is moved backward and the addressed 4-byte content is assigned as subscript b; The offset is the sum of 0x9D0 and subscript b multiplied by 4, the starting address of data a is used as the first address, and the continuous 4 bytes addressed are offset backward and assigned to subscript a; The product of 0x9D4 plus subscript b multiplied by 4 is used as the offset, the starting address of data a is used as the first address, and the continuous 4 bytes addressed are offset backward and assigned to subscript a; A6: Subscript a increases by 1, and subscript b increases by 2; A7: Determine whether the subscript a is less than or equal to 0x272. If so, execute step A5; otherwise, execute step A8. A8: Take the starting address of data a as the first address, shift 0x9CC bytes backward and assign the addressed 4-byte content to 0x7FFFFFFF; Take the starting address of data a as the first address, shift backward 0x1398 bytes and assign the addressed 4-byte content to 0x0; Output data a; B. Setting data b to generate auxiliary operations for encrypted data includes the following steps: B0: The subscript a is initialized to 0x1001; B1: Use the product of the subscript a and 4 as the offset, the starting address of data b as the first address, shift backward and assign the addressed 4-byte content to 0x1000; B2: Subscript a is incremented by 1; B3: Determine whether the subscript a is not equal to 0x1101. If so, execute step A1. Otherwise, end the setting process of data b and output data b. C. Setting data c to generate auxiliary operations for encrypted data includes the following steps: C0: The subscript a is initialized to 0x0; C1: Use the product of the subscript a and 4 as the offset, the starting address of data c as the first address, shift backward and assign the addressed 4-byte content to 0x1000; C2: subscript a is incremented by 1; C3: Determine whether the subscript a is not equal to 0x1000. If so, execute step C1. Otherwise, end the setting process of data c and output data c. D. Setting data d to temporarily store data, from which values ​​are taken when calculating encrypted data, including the following steps: Set the byte length of data d to 0x103C bytes, and fill in 0xFC4 0x20s consecutively from the first address; E. Set data f and data g: Get data f and data g from PC-3000Portable-III 003396 software to generate auxiliary operations for encrypted data.

4. A method for compressing a decompressed data body according to claim 1, characterized in that: The first method comprises the following steps: I-1: Input data and assign initial values: Input data Ia, data Ib, and data Ic are all initialized to 0; I-2: Use the product of Ia multiplied by 4 plus 0x139C as the offset, use the starting address of data a as the first address, offset backward and obtain the addressed continuous 4-byte content and assign it to data Id; I-3: data Ib is shifted right by 1 bit; I-4: Determine whether the result of the AND operation between the data Id and 0x01 is equal to 0x01. If yes, execute step I-5; otherwise, execute step I-6; I-5: Data Ib is incremented by 0x80000000; I-6: Data Ic is incremented by 1; I-7: Use the product of Id multiplied by 4 plus 0x9D0 as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content and assign it to data Id; I-8: Determine whether the data ID is equal to 0x272. If so, execute step I-9; otherwise, execute step I-7. I-9: Use the fourth method and assign the input data IV-a to data Id, and the input data IV-b to data Ib; IA: The fifth method is adopted and the input data Va is assigned to data Ia.

5. The method for compressing a decompressed data body according to claim 1, characterized in that: The second method comprises the following steps: II-1: Input data II-a; II-2: Generate data IV-a: Shift the value of data II-a right by 6 bits to generate the value as the offset, take the starting address of data f as the first address, shift backward and assign the content of the 1-byte addressed to data IV-a; II-3: Generate data IV-b: Shift the value of data II-a right by 6 bits to generate the value as the offset, take the starting address of data g as the first address, shift backward and obtain the content of the addressed 1 byte, and assign the value generated by shifting the obtained 1 byte content left by 24 bits to data IV-b; II-4: Use the current data IV-a and data IV-b and execute the fourth method; II-5: Generate data IV-a again: assign data IV-a to 0x06; II-6: Generate data IV-b again: the result of performing AND operation on data II-a and 0x3F, and then left shifting 0x1A bits to generate the value, and assigning the generated value to data IV-b; II-7: Use the current data IV-a and data IV-b to execute the fourth method.

6. A method for compressing a decompressed data body according to claim 1, characterized in that: The third method comprises the following steps: III-1: Input data III-a; III-2: With data III-a as the offset and the starting address of data d as the first address, it shifts backward and obtains the addressed 1-byte content, and the sum of the obtained 1-byte content plus 0x1001 is assigned to data III-b; III-3: Data III-c is initialized to 1; III-4: Using the sum of data III-a and data III-c as the offset, and the starting address of data d as the first address, shift backward and obtain the addressed 1-byte content and assign it to data III-d; Using the sum of data III-b and data III-c as the offset, using the starting address of data d as the first address, shift backward and obtain the addressed 1-byte content and assign it to data III-e; III-5: Determine whether data III-d is equal to data III-e, if yes, execute step III-6, otherwise, execute step III-8; III-6: Data III-c is incremented by 1; III-7: Determine whether data III-c is equal to 0x3B. If so, execute step III-8; otherwise, execute step III-4; III-8: Determine whether data III-d is equal to data III-e. If so, execute step III-9; otherwise, execute step III-A. III-9: Data III-c is assigned the value 0x3C; III-A: Determine whether data III-c is greater than data m. If so, execute step III-B. Otherwise, end the process of the third method. III-B: The difference between data III-a and data III-b is ANDed with 0xFFF, and then the difference is subtracted from 0x01, which is assigned to data n, and the current data III-c is assigned to data m.

7. A method for compressing a decompressed data body according to claim 1, characterized in that: The fourth method comprises the following steps: IV-1: Input data IV-a, data IV-b, and assign data IV-c to 0x80000000; IV-2: Perform an AND operation on data IV-c and data IV-b to determine whether the result of the AND operation is equal to 0. If so, execute step IV-4; otherwise, execute step IV-3. IV-3: The result of the OR operation of data x and data y is assigned to data y; IV-4: Data IV-c is shifted right by 1 bit, and data x is shifted right by 1 bit; IV-5: Determine whether the data x is equal to 0, if yes, execute step IV-6, otherwise, execute step IV-7; IV-6: Use the target index as the offset, the starting address of the target data as the first address, offset backward and address the continuous 4-byte content, and assign the addressed 4-byte content to data y; Data x is assigned a value of 0x80000000, and data y is assigned a value of 0; IV-7: Data IV-a is decremented by 1; IV-8: Determine whether data IV-a is equal to 0, if yes, execute step IV-9, otherwise, execute step IV-2; IV-9: End the process of the fourth method.

8. A method for compressing a decompressed data body according to claim 1, characterized in that: The fifth method comprises the following steps: V-0: input data Va; V-1: Take the product of data Va multiplied by 4 and the sum of 0x139C as the offset, take the starting address of data a as the first address, shift backward and obtain the continuous 4-byte content, and assign the obtained 4-byte content to data Va; V-2: Use the product of data Va multiplied by 4 as the offset, the starting address of data a as the first address, shift backward and add 1 to the continuous 4-byte content, and assign the result of adding 1 to the continuous 4-byte content to data Vb; V-3: Use the product of the sum of data Va plus 1 and 4 as the offset, the starting address of data a as the first address, and shift backward to obtain the addressed continuous 4-byte content; V-4: Determine whether the data Vb is greater than the 4-byte content obtained in step V-3. If so, execute step V-5; otherwise, execute step V-9; V-5: the sum of data Va plus 2 is assigned to data Vc; V-6: Use the product of data Vc multiplied by 4 as the offset, the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content; V-7: Determine whether the data Vb is greater than the 4-byte content obtained in step V-6. If so, execute step V-8; otherwise, execute step V-9; V-8: Data Vc is incremented by 1, and step V-6 is executed; V-9: data Vc is decremented by 1; VA: Perform the first swap: VA-1: Use the product of data Va multiplied by 4 as the offset, the starting address of data a as the first address, and shift backward to obtain the addressed continuous 4-byte content; VA-2: Use the product of data Vc multiplied by 4 as the offset, the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content; VA-3: For data a, swap the consecutive 4-byte contents obtained in step VA-1 and step VA-2; VB: Perform the second swap: VB-1: Use the product of data Va multiplied by 4 plus 0x139C as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content; VB-2: Use the product of data Vc multiplied by 4 plus 0x139C as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content; VB-3: For data a, swap the consecutive 4-byte contents obtained in step VB-1 and step VB-2; VC: Execute the third swap: VC-1: The product of data Va multiplied by 4 plus 0x1884 is used as the offset, and the starting address of data a is used as the first address. The address is shifted backward to obtain the continuous 4-byte content; VC-2: Use the product of data Vc multiplied by 4 plus 0x1884 as the offset, use the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content; VC-3: For data a, swap the consecutive 4-byte contents obtained in steps VC-1 and VC-2; VD: Assign data Va to data Vc; VE: Take the product of data Va multiplied by 4 plus 0x9D0 as the offset, take the starting address of data a as the first address, shift backward and obtain the addressed continuous 4-byte content, and assign the obtained 4-byte content to data Va; VF: Determine whether the data Va is not equal to 0. If so, execute step V-2; otherwise, execute step VG; VG: End of the fifth method process.

Citation Information

Cited By

  • Method for unlocking hard disk ROM (Read Only Memory) file

    CN120407287A