# US 2022/0294469 A1 · Compression device and control method

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0294469 A1
- Document ID: US20220294469A1
- Status: Published application
- Kind: A1
- Application number: 17/304,130
- Filed: 2021-06-15
- Published: 2022-09-15
- Earliest claimed: 2021-03-11
- Assignees: Kioxia Corporation
- Applicants: Kioxia Corporation
- Inventors: Sho KODAMA; Masato SUMIYOSHI; Keiri NAKANISHI
- Web page: https://patentgrep.com/patent/US20220294469A1

## CPC

- H03M 7/4043: {Adaptive prefix coding}
- H03M 7/4093: {Variable length to variable length coding}
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- H03M 7/6023: {Parallelization}
- G06F 3/0655: {Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices}
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

According to one embodiment, a compression device includes a coding information generation unit. The unit determines code lengths that are respectively associated with a plurality of symbols, based on a frequency of occurrence of each of the plurality of symbols. When the plurality of symbols include one or more first symbols that are respectively associated with one or more first code lengths exceeding an upper limit, the unit changes the first code lengths to the upper limit, selects, from one or more second symbols of the plurality of symbols that are respectively associated with one or more second code lengths shorter than the upper limit, at least one symbol in descending associated code length order, changes at least one code length associated with the symbol to the upper limit.

## Claims

### Claim 1

A compression device comprising:
a coding information generation unit configured to:
determine a plurality of code lengths that are respectively associated with a plurality of symbols, based on a frequency of occurrence of each of the plurality of symbols; and
when the plurality of symbols include one or more first symbols that are respectively associated with one or more first code lengths exceeding an upper limit, change the one or more first code lengths to the upper limit, select, from one or more second symbols of the plurality of symbols that are respectively associated with one or more second code lengths shorter than the upper limit, at least one third symbol in descending associated code length order, change at least one third code length associated with the at least one third symbol to the upper limit, and generate coding information that indicates the plurality of symbols and a plurality of variable-length codes that are respectively associated with the plurality of symbols, using at least the one or more first code lengths and the at least one third code length that are changed; and
a coding unit configured to convert a symbol of the plurality of symbols into a variable-length code of the plurality of variable-length codes using the coding information,
wherein a code length of each of the plurality of variable-length codes is a bit length from one to the upper limit.

### Claim 2 (depends on 1)

The compression device of claim 1, wherein
the coding information generation unit is configured to calculate, after changing the at least one third code length to the upper limit, a left side value of a Kraft's inequality indicated below:
Σs∈S2−l(s)≤1
where S represents the plurality of symbols, s represents a symbol belonging to the plurality of symbols, and l(s) represents a code length associated with a symbol s, and
when the left side value of the Kraft's inequality is larger than one, the coding information generation unit repeats a process until the left side value of the Kraft's inequality is equal to or smaller than one, wherein the process includes selecting at least one fourth symbol, which is not selected yet, in descending associated code length order from the one or more second symbols, and changing at least one fourth code length associated with the at least one fourth symbol to the upper limit.

### Claim 3 (depends on 2)

The compression device of claim 2, wherein
the at least one third symbol is M symbols,
M is an integer of two or more, and
the coding information generation unit is configured to:
change, in parallel, M code lengths that are respectively associated with the M symbols to the upper limit; and
calculate the left side value of the Kraft's inequality.

### Claim 4 (depends on 3)

The compression device of claim 3, wherein
the at least one fourth symbol is N symbols,
N is an integer that is equal to or less than M, and
the coding information generation unit is configured to:
change, in parallel, N code lengths that are respectively associated with the N symbols to the upper limit; and
calculate the left side value of the Kraft's inequality.

### Claim 5

A control method of a compression device, comprising:
determining a plurality of code lengths that are respectively associated with a plurality of symbols, based on a frequency of occurrence of each of the plurality of symbols;
when the plurality of symbols include one or more first symbols that are respectively associated with one or more first code lengths exceeding an upper limit, changing the one or more first code lengths to the upper limit, selecting, from one or more second symbols of the plurality of symbols that are respectively associated with one or more second code lengths shorter than the upper limit, at least one third symbol in descending associated code length order, changing at least one third code length associated with the at least one third symbol to the upper limit, and generating coding information that indicates the plurality of symbols and a plurality of variable-length codes that are respectively associated with the plurality of symbols, using at least the one or more first code lengths and the at least one third code length that are changed; and
converting a symbol of the plurality of symbols into a variable-length code of the plurality of variable-length codes using the coding information,
wherein a code length of each of the variable-length codes is a bit length from one to the upper limit.

### Claim 6 (depends on 5)

The control method of claim 5, wherein after changing the at least one third code length to the upper limit, calculating a left side value of a Kraft's inequality indicated below:
93 s∈S2−l(s)≤1
where S represents the plurality of symbols, s represents a symbol belonging to the plurality of symbols, and l(s) represents a code length associated with a symbol s, and
when the left side value of the Kraft's inequality is larger than one, repeating a process until the left side value of the Kraft's inequality is equal to or smaller than one, wherein the process includes selecting at least one fourth symbol, which is not selected yet, in descending associated code length order from the one or more second symbols, and changing at least one fourth code length associated with the at least one fourth symbol to the upper limit.

### Claim 7 (depends on 6)

The control method of claim 6, wherein
the at least one third symbol is M symbols,
M is an integer of two or more, and
the control method further comprises:
changing, in parallel, M code lengths that are respectively associated with the M symbols to the upper limit; and
calculating the left side value of the Kraft's inequality.

### Claim 8 (depends on 7)

The method of claim 7, wherein
the at least one fourth symbol is N symbols,
N is an integer that is equal to or less than M, and
the control method further comprises:
changing, in parallel, N code lengths that are respectively associated with the N symbols to the upper limit; and
calculating the left side value of the Kraft's inequality.

### Claim 9

A memory system comprising:
a nonvolatile memory; and
a controller connected to the nonvolatile memory,
wherein the controller is configured to:
determine a plurality of code lengths that are respectively associated with a plurality of symbols, based on a frequency of occurrence of each of the plurality of symbols;
when the plurality of symbols include one or more first symbols that are respectively associated with one or more first code lengths exceeding an upper limit, change the one or more first code lengths to the upper limit, select, from one or more second symbols of the plurality of symbols that are respectively associated with one or more second code lengths shorter than the upper limit, at least one third symbol in descending associated code length order, change at least one third code length associated with the at least one third symbol to the upper limit, and generate coding information that indicates the plurality of symbols and a plurality of variable-length codes that are respectively associated with the plurality of symbols, using at least the one or more first code lengths and the at least one third code length that are changed;
convert a symbol of the plurality of symbols into a variable-length code of the plurality of variable-length codes using the coding information; and
write data based on the variable-length code, which is obtained by the conversion, into the nonvolatile memory,
wherein a code length of each of the plurality of variable-length codes is a bit length from one to the upper limit.

### Claim 10 (depends on 9)

The memory system of claim 9, wherein
the controller is configured to calculate, after changing the at least one third code length to the upper limit, a left side value of a Kraft's inequality indicated below:
Σs∈S2−l(s)≤1
where S represents the plurality of symbols, s represents a symbol belonging to the plurality of symbols, and l(s) represents a code length associated with a symbol s, and
the controller is configured to repeat, when the left side value of the Kraft's inequality is larger than one, a process until the left side value of the Kraft's inequality is equal to or smaller than one, wherein the process includes selecting at least one fourth symbol, which is not selected yet, in descending associated code length order from the one or more second symbols, and changing at least one fourth code length associated with the at least one fourth symbol to the upper limit.

### Claim 11 (depends on 10)

The memory system of claim 10, wherein
the at least one third symbol is M symbols,
M is an integer of two or more, and
the controller is configured to:
change, in parallel, M code lengths that are respectively associated with the M symbols to the upper limit; and
calculate the left side value of the Kraft's inequality.

### Claim 12 (depends on 11)

The memory system of claim 11, wherein
the at least one fourth symbol is N symbols,
N is an integer that is equal to or less than M, and
the controller is configured to:
change, in parallel, N code lengths that are respectively associated with the N symbols to the upper limit; and
calculate the left side value of the Kraft's inequality.
