<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Redistribution of the Compressed Data Between Modified DEFLATE-Blocks in the Image Compression Process Without Lossless</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Andrii</forename><surname>Bomba</surname></persName>
							<email>abomba@ukr.net</email>
							<affiliation key="aff0">
								<orgName type="institution">National University of Water and Environmental Engineering</orgName>
								<address>
									<addrLine>11, Soborna Str</addrLine>
									<postCode>33028</postCode>
									<settlement>Rivne</settlement>
									<country key="UA">Ukraine</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Alexander</forename><surname>Shportko</surname></persName>
							<email>itshportko@gmail.com</email>
							<affiliation key="aff1">
								<orgName type="institution">Academician Stepan Demianchuk International University of Economics and Humanities</orgName>
								<address>
									<addrLine>4, Acad. S. Demianchuk Str</addrLine>
									<postCode>33000</postCode>
									<settlement>Rivne</settlement>
									<country key="UA">Ukraine</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Veronika</forename><surname>Postolatii</surname></persName>
							<email>veronikashportko@gmail.com</email>
							<affiliation key="aff2">
								<orgName type="institution">National University &quot;Lviv Polytechnic&quot;</orgName>
								<address>
									<addrLine>12, St. Bandera Str</addrLine>
									<postCode>79000</postCode>
									<settlement>Lviv</settlement>
									<country key="UA">Ukraine</country>
								</address>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff3">
								<address>
									<settlement>Lviv</settlement>
									<country key="UA">Ukraine</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Redistribution of the Compressed Data Between Modified DEFLATE-Blocks in the Image Compression Process Without Lossless</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">DD10ACE8B62F4B43EA18D6096186D9FA</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2025-04-23T20:00+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Image compression lossless</term>
					<term>DEFLATE compressed data format</term>
					<term>LZ77 dictionary compression algorithm. 1</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Reasonable expediency of each stage of lossless image compression. The advantages and disadvantages of the DEFLATE data compression format are described. The feasibility of using arithmetic coding instead of Huffman compression in modifications of this format is argued. The principles of redistribution of compressed data between DEFLATE-blocks in order to increase their homogeneity to reduce data compression coefficients are presented and substantiated. The software implementation of this redistribution of compressed data between DEFLATE blocks in C++ language is given. On commonly known test the ACT set shows that application proposed redistribution of coded data between modified DEFLATE blocks in the process of lossless progressive hierarchical compression enables reduce the total size of its compressed images by 3 KB and speeds up decoding by an average of 2.14%, although it slows down encoding by 6.48 %.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Today, files transmitted by communication channels most often contain data of one of four main types: texts, images, video or sound. And if 4 KB is enough to store one page of unformatted text, then a photo-realistic raster image of 1015 cm size without compression can take several MB, song recordings -tens of MB, and movie recordings -several GB. Fortunately, most of these files have a high level of redundancy. It is the reduction of redundancy that allows you to compress files and thereby increase the speed of information exchange over the network and reduce the amount of disk space used.</p><p>Most of the well-known algorithms that allow you to compress images dozens of times (JPEG <ref type="bibr" target="#b0">[1]</ref>[2], fractal and wavelet transforms <ref type="bibr" target="#b2">[3]</ref>) lead to slight loss of image quality. Such losses are invisible for photorealistic high-resolution images, but affect the quality of low-resolution images with fragments of business graphics or discrete-tone transitions. In addition, there are classes of images for which distortions are unacceptable (for example, X-rays). Algorithms for image compression without loss <ref type="bibr" target="#b3">[4]</ref>, although they compress images much weaker, do not lead to deterioration of their quality. Currently, lossy image compression algorithms are developing most dynamically, although lossless image compression algorithms are also gradually increasing their compression rates. Therefore, in the era of information civilization, when most information is stored electronically, the problem of lossless image compression by reducing redundancy remains relevant now and will be relevant in the future.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Related works. Stages lossless compression of images</head><p>As it is known, any data compression is possible precisely due to the reduction or elimination of redundancies <ref type="bibr" target="#b4">[5]</ref>. Three main types of redundancies are distinguished in images <ref type="bibr" target="#b5">[6]</ref>: visual (consisting in the presence of information that is not perceived by the human visual system), inter-element or spatial (manifested in the correlation of brightness of adjacent pixels or components of the color model) and code (revealed when using codes of the same length for items with different probabilities). The more types of redundancies of each type are processed in a graphic format, the more effective the compression is. In the process of lossless compression, no information is lost, so the first type of redundancy is not reduced.</p><p>To reduce redundancies of the second and third types in archivers and graphic formats lossless compression of images most often occurs in a maximum of four stages:</p><p>1. At the first stage, context-dependent coding reduces redundancies between the same fragments or fragments with the same structure (reduces inter-element redundancy, can be also used before the fourth stage). For example, the popular context-dependent algorithm LZ77 <ref type="bibr" target="#b6">[7]</ref> is based on the replacement in the output stream of the sequence of consecutive literals of the buffer with a reference to a similar pre-encoded sequence of dictionary literals in the form of a pair of numbers &lt;length, offset from the end of the dictionary&gt; in the process of coding. If there is no similar sequence of literals in the dictionary longer than two literals, the first literal of the buffer is transferred to the output stream without changes. After that, the encoded literals are transferred from the beginning of the buffer to the end of the dictionary and the encoding continues similarly until the end of the literals of the input stream. An example of the step-by-step results of the LZ77 algorithm scheme formation for flow <ref type="bibr">3, 4, 6, 3, 4, 6, 3, 2, 6, 3, 4, 4 from [8]</ref> is given in Table <ref type="table" target="#tab_0">1</ref>. This stream in algorithm-encoded form will be written as 3, 4, 6, &lt;4, 3&gt;, 2, &lt;3, 6&gt;, 4; 2. At the second stage, the transition to an alternative color model is performed. For example, in a popular archiver WinRAR <ref type="bibr" target="#b8">[9]</ref> before lossless image compression, the transition from the RGB color model to the R-G, G, B-G color model is performed; 3. On the third, the brightness of the pixel components is transformed using predictors <ref type="bibr" target="#b9">[10]</ref>, which during image traversal predict the brightness value of each component of the next pixel (for example, for the most common 24-bit images, these are the brightness of the red, green, and blue components, written as integers in separate bytes), using the brightness values of the same components of previously processed adjacent pixels. In the process of using this approach, deviations ij  of the value of the brightness of the next pixel component ij brightness from the value predicted by the selected predictor ij predict are calculated and further coded, i.e.</p><formula xml:id="formula_0">ij ij ij predict brightness   </formula><p>(1) (i and j run respectively through all the rows and columns of the pixel components of the image). Adjacent image pixels most commonly have similar colors, which means that they also have close value brightness of relevant components, therefore value forecast often matches with value brightness of the regular components, most often it is close to this value and rarely -much differs from him (Figure <ref type="figure">1</ref> from <ref type="bibr" target="#b9">[10]</ref>). That is, most of the values ij  are close to zero. The use of predictors is similar to delta coding <ref type="bibr" target="#b1">[2]</ref>; a) b) Figure <ref type="figure">1</ref>: A division of frequencies of values of green components of image Lena.bmp: a) before the use of predictor (H =7.59 of bpb); b) after the use of Left-predictor (H =5.34 of bpb) with <ref type="bibr" target="#b9">[10]</ref> 4. At the fourth stage, context-independent coding forms element codes with lengths that dependent on their probabilities (processes code redundancy). Identical fragments or fragments of the same structure targeted by context-sensitive coding rarely occur in photorealistic images, so the only universal step of lossless image compression is contextindependent coding itself. It can even be used instead of context-sensitive luminance codes of individual pixels, if this further reduces the compression ratio (the ratio of the size of compressed to uncompressed image files, expressed in bpb, hereafter CR). According to our calculations, the application of a context-independent algorithm reduces the CR of images by 33% on average. Therefore, let's consider the ideas of this coding in more detail. The main principle of context-independent coding is formulated as follows: the length of the code of an arbitrary element with a higher probability should not exceed the length of the code of any element with a lower probability. This principle is based on the fundamental position of information theory, according to which, in order to minimize the length of the sequence code, an element i s with a probability of occurrence   i s p should be coded with</p><formula xml:id="formula_1">  i s p 2 log </formula><p>bits <ref type="bibr" target="#b5">[6]</ref>. Then the average code length of the block element after applying any context-independent algorithm according to the formula of Shannon <ref type="bibr" target="#b10">[11]</ref> cannot be less than the entropy of the source</p><formula xml:id="formula_2">    . log 2     i i i s p s p H (<label>1</label></formula><formula xml:id="formula_3">)</formula><p>In practice today, two alternative context-independent methods are most often used: Huffman coding and arithmetic coding.</p><p>Huffman coding (HUFF) matches each element depending on its probability (frequency of occurrence) with a fixed prefix code <ref type="bibr" target="#b11">[12]</ref> [13] <ref type="bibr">[14][15]</ref>. This coding is most often performed in the following sequence: the probabilities (frequencies) of individual elements are calculated; elements in descending order of probabilities are arranged; the two elements with the lowest probabilities (most often the last ones in the created list) are iteratively combined in order to obtain one element, the code 0 to the first one, and 1 to the second one are added; the probabilities of the selected elements to calculate the probability of the formed element and insert this element into the sorted list of probabilities are summed; HUFF codes are formed, the formed codes in reverse order -from the top to each element are written. The average length of the HUFF code coincides with the entropy of the source only when for all elements s i the lengths of their optimal codes -log2 p(s i) are integers. In addition, the length of the HUFF code of even the most probable element cannot be less than one bit. Arithmetic compression (ARIC), in contrast to HUFF coding, matches each successive element with an interval with a length proportional to its probability (frequency) <ref type="bibr" target="#b15">[16]</ref> [17][18] <ref type="bibr" target="#b18">[19]</ref>. At the same time, a subinterval corresponding to the first element of the flow is selected from the initial interval (most often [0; 1)) and further considered. This subinterval is again divided in proportion to the frequencies of individual elements, and the subinterval corresponding to the second element of the flow is selected from it (see, for example, Figure <ref type="figure" target="#fig_1">2</ref> from <ref type="bibr" target="#b19">[20]</ref>, on which the subintervals are ordered by the increasing values of the elements). The selection of subintervals continues in the same way until the end of the flow elements. Thus, the final length of the selected subinterval is equal to the product of the probabilities of all elements, and its beginning depends on the sequence of these elements in the stream. The result of ARIC is any number from the last subinterval received. Taking into account the finiteness of the numbers, to record the resulting number, the first significant digits of the intervals are monitored each time, and if they match, these digits are recorded in the output stream and excluded from further consideration. Decoding of the next ARIC element is performed by determining the corresponding next subinterval to which the read number belongs. with <ref type="bibr" target="#b19">[20]</ref> From the description of the ARIC principles, it follows that in order to perform such arithmetic compression, the coder and, even more so, the decoder, must know the probabilities (frequencies) of individual elements. Today, two strategies for forming these frequencies are widely used: static and adaptive. In the case of a static strategy, the frequencies of individual elements are transmitted to the decoder in compressed data explicitly. When using an adaptive strategy, the intervals of the elements are formed synchronously by the encoder and decoder in the process of data processing. The adaptive strategy provides, as a rule, better CR (since it does not need to store the frequencies of individual elements in the compressed data and takes into account the unevenness of the distribution of the current sequence of elements, and not the flow in general), but it significantly slows down the work of the decompressor, because it requires recalculation of the probabilities of the elements in the decoding process. Graphics file formats should, first of all, provide fast decoding, so they often use a static strategy for forming element intervals.</p><p>To speed up the development of graphic formats, data compression formats are created, improved and used, which combine proven context-dependent and context-independent algorithms. One of the successful examples of such a combination is the DEFLATE dictionary compression format <ref type="bibr" target="#b20">[21]</ref>, which for processing of incoming flow uses context-dependent LZ77 algorithm <ref type="bibr" target="#b6">[7]</ref>, a the results of his work is compressed by Huffman's dynamic codes <ref type="bibr" target="#b11">[12]</ref>. This format is used in many popular archivers (for example, GZIP <ref type="bibr" target="#b21">[22]</ref>) and graphic formats (for example, PNG <ref type="bibr" target="#b22">[23]</ref>) and does not need the acquisition licenses for use in applied software. We use this compressed data format to develop a lossless progressive hierarchical image compression format <ref type="bibr" target="#b7">[8]</ref>[10] <ref type="bibr" target="#b19">[20]</ref>.</p><p>It is clear that implementations of the decoding algorithm of LZ77 codes must distinguish between individual literals and groups &lt;length; displacement&gt;. In the DEFLATE format, for this purpose, the lengths of the substitutions and the individual literals of the LZ77 algorithm are encoded together as numbers in the range [0; 285]. At the same time, in each compressed block numbers from the range [0; 255] correspond to the codes of individual literals, 256 marks the end of the block, and numbers from the range [257; 285] indicate the basic values of lengths. After the basic length values, there is a number of bits defined by the format, which, together with the basic value, uniquely determines the replacement length <ref type="bibr" target="#b20">[21]</ref>. The offset is stored after the corresponding replacement length similarly -in the form of the base value and additional bits. The basic displacement value is within [0; 29]. In the DEFLATE format, the maximum encoded sequence length can be 258, the offset can be 32768, and different dynamic codes HUFF are used to encode the base literals/lengths and offsets.</p><p>The purpose of this article is to describe and justify the algorithm for redistribution of compressed data between modified DEFLATE blocks to improve the compression performance of this format.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Options for reducing the size of compressed data in the DEFLATE format</head><p>Let's first emphasize the reasons for improving compression by context-independent algorithms of the fourth stage in cases of applying the algorithms of the second and third stages. Let's investigate the dependence of entropy for the case of two elements (Figure <ref type="figure" target="#fig_2">3</ref> and <ref type="bibr" target="#b23">[24]</ref>). Let the probability of the appearance of the first element be equal to 1 p . Then the probability of the second element will be</p><formula xml:id="formula_4">1 2 1 p p  </formula><p>, and the entropy will be equal to</p><formula xml:id="formula_5">      1 2 1 1 2 1 1 log 1 log p p p p H     </formula><p>. We see that the entropy is maximal when</p><formula xml:id="formula_6">5 . 0 2 1   p p</formula><p>. The greater the probabilities of the elements differ among themselves, that is, the greater the unevenness of the distribution is, the lower the entropy is <ref type="bibr" target="#b23">[24]</ref>. For M the entropy of different elements is also maximal when the probabilities of these elements are the same and is calculated by Hartley's formula <ref type="bibr" target="#b23">[24]</ref>: Difference color models of the second and predictors of the third stage of lossless image compression do not compress the image, but increase the unevenness of the brightness distribution around zero (Figure <ref type="figure">1b</ref>) and therefore reduce the entropy (1), i.e. increase the code redundancy by reducing the inter-element one.</p><formula xml:id="formula_7">. log 2 M H  (2)</formula><p>Taking into account the fact that arithmetic coding more accurately encodes elements whose occurrence of probabilities are not equal to powers of two <ref type="bibr" target="#b4">[5]</ref>, we modified the DEFLATE compressed data format by applying E. Shelvin's range coder in it, the code of which can be found, for example, in <ref type="bibr" target="#b24">[25]</ref>. This encoder reads/writes bytes instead of bits of data and thus significantly speeds up encoding/decoding. For each element, it uses an interval with an integer length proportional to its probability. In order to store the length of the interval for each element in the header of the modified DEFLATE-block of compressed data, instead of the length of the HUFF code, we write the number of bits for storing the corresponding length of the interval in the general interval [0; 32768), and after the header -a binary record of this length without the first bit (which is always equal to one) <ref type="bibr" target="#b19">[20]</ref>. The DEFLATE format uses a maximum of 285 different elements to encode literals/lengths replacement. If there are M different elements in the next modified DEFLATE block, then, taking into account (2), the number of additional bits for recording their interval lengths in the block header will be</p><formula xml:id="formula_8">    1 log 2   M M</formula><p>, if these elements are equally likely. In general, the header size of the modified DEFLATE block will not exceed 2635 bits.</p><p>The size of the most compressed data in each block by its length entropy code <ref type="bibr" target="#b19">[20]</ref>    , log log At first glance, it seems that combining all the compressed data into one modified DEFLATE block should reduce CR, because then only one header of the compressed data block needs to be stored instead of many. But it was shown in work <ref type="bibr" target="#b19">[20]</ref> that the combination of blocks of compressed data does not reduce (most often -increases) the length of their entropy code. The greater the difference between the relative frequencies of each element in the two input blocks is, the greater the additional increase in the length of the entropy code (Figure <ref type="figure">4</ref> from <ref type="bibr" target="#b19">[20]</ref>) will be. This gain is zero only when the relative frequencies of the element in the two input blocks match.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Figure 4:</head><p>The dependence of the increase in the length of the entropy code of the combination of two input sequences on the frequencies of the element s i in these input sequences <ref type="bibr" target="#b19">[20]</ref> Taking into account (3), the increase in the length of the entropy code due to the combination of two adjacent blocks will be calculated using the formula <ref type="bibr" target="#b3">(4)</ref> </p><formula xml:id="formula_9">               , log log log log log log 2 2 2 2 2 2                                       i i i i i i i i i i i H N N N N N N N N N N N N N N N N dL</formula></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2 : Arithmetic coding of the first three elements of the sequence 36,38, 35, 35, 40, 36, 40, 38, 45, 38    </figDesc><graphic coords="4,125.68,318.20,343.65,108.90" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Figure 3 :</head><label>3</label><figDesc>Figure 3: Dependence of the entropy of a source of two elements on the probability of the first element appearing</figDesc><graphic coords="5,109.25,489.41,376.14,205.50" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0"><head></head><label></label><figDesc></figDesc><graphic coords="10,72.00,72.00,450.95,261.85" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1 Step-by-step flow compression results 3, 4, 6, 3, 4, 6, 3, 2, 6, 3, 4, 4 according to the algorithm LZ77 with [8]</head><label>1</label><figDesc></figDesc><table><row><cell>№</cell><cell cols="2">Sliding window (input stream)</cell><cell>Matching</cell><cell cols="2">Encoded data (output stream)</cell></row><row><cell>step</cell><cell>dictionary</cell><cell>buffer</cell><cell>sequence</cell><cell>&lt;length, offset&gt;</cell><cell>element</cell></row><row><cell>1.</cell><cell>-</cell><cell>3, 4, 6, 3, 4, 6, 3, 2, 6, 3, 4, 4</cell><cell>-</cell><cell>-</cell><cell>3</cell></row><row><cell>2.</cell><cell cols="2">3 4, 6, 3, 4, 6, 3, 2, 6, 3, 4, 4</cell><cell>-</cell><cell>-</cell><cell>4</cell></row><row><cell>3.</cell><cell cols="2">3, 4 6, 3, 4, 6, 3, 2, 6, 3, 4, 4</cell><cell>-</cell><cell>-</cell><cell>6</cell></row><row><cell>4.</cell><cell cols="2">3, 4, 6 3, 4, 6, 3, 2, 6, 3, 4, 4</cell><cell>3, 4, 6, 3</cell><cell>&lt;4, 3&gt;</cell><cell>-</cell></row><row><cell>5.</cell><cell cols="2">3, 4, 6, 3, 4, 6, 3 2, 6, 3, 4, 4</cell><cell>-</cell><cell>-</cell><cell>2</cell></row><row><cell>6.</cell><cell cols="2">3, 4, 6, 3, 4, 6, 3, 2 6, 3, 4, 4</cell><cell>6, 3, 4</cell><cell>&lt;3, 6&gt;</cell><cell>-</cell></row><row><cell>7.</cell><cell cols="2">3, 4, 6, 3, 4, 6, 3, 2, 6, 3, 4 4</cell><cell>-</cell><cell>-</cell><cell>4</cell></row><row><cell>8.</cell><cell>3, 4, 6, 3, 4, 6, 3, 2, 6, 3, 4, 4</cell><cell></cell><cell>-</cell><cell>-</cell><cell>-</cell></row></table></figure>
		</body>
		<back>
			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>where ' indicates the corresponding characteristic of the first block, and '' indicates the characteristic of the second.</p><p>Therefore, to reduce the size of compressed data in the DEFLATE format, it is advisable to implement the following options for redistributing compressed data between its blocks:</p><p>1. Combine two adjacent blocks of compressed data, if the increase in the length of the entropy code from their combination (4) does not exceed the savings from storing the header of the combined block instead of the two headers of these adjacent blocks; 2. Split blocks of compressed data into homogeneous blocks, if the decrease in the length of the entropy code from such a split exceeds the increase in the size of their headers.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Software implementation of redistribution of compressed data between modified DEFLATE-blocks</head><p>Let us first provide the text of the function in the C++ language for calculating the predicted length of the DEFLATE entropy code of the compressed data block (3) based on the frequencies of its elements, taking into account the predicted length of its header: </p><p>Using these functions, a possible combination of two adjacent DEFLATE blocks (the first option of redistribution) is realized by postponing the data storage of the previous block of compressed data. If the sum of the sizes of the previous and current blocks does not exceed the maximum allowable and the combination of blocks reduces the size of the compressed data, then we will join the current block to the previous one. Otherwise, we will output the previous block, and postpone the current one for further analysis: To perform the division of input blocks of compressed data into homogeneous blocks (the second variant of redistribution), we implemented the fragmentation algorithm described in <ref type="bibr" target="#b25">[26]</ref>, for dividing the input block into homogeneous blocks with different statistical characteristics. Having these homogeneous blocks, we iteratively choose and combine two adjacent ones that maximally reduce the length of the compressed data as long as such reduction is expected. Each of the remaining blocks after iterative combination is output as a separate DEFLATE block. Here is a fragment of the program for iteratively combining homogeneous blocks into initial DEFLATE blocks: </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Results of the applying redistribution of compressed data between modified DEFLATE-blocks in the process of progressive hierarchical lossless image compression</head><p>We present the results of the impact of the redistribution of compressed data between DEFLATE-blocks (Table <ref type="table">2</ref> -Table <ref type="table">4</ref>) on image compression of the well-known Archive Comparison Test test set (ACT, Figure <ref type="figure">4</ref>) in the process of progressive hierarchical bypass <ref type="bibr" target="#b7">[8]</ref>[10] <ref type="bibr" target="#b19">[20]</ref>. You can download these images, for example, from <ref type="bibr" target="#b26">[27]</ref>. This set contains both synthesized (№ 1, 2, 7) and photorealistic (the rest) images. The choice of this particular test set is determined by the diversity of its images and the availability in open sources of the results of testing algorithms on it by other researchers. Testing was conducted on a computer with an Intel processor Pentium 4 with a clock frequency of 3 GHz and 4 Gb of RAM.  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">Discussions</head><p>From the data in Table <ref type="table">2</ref>-Table <ref type="table">4</ref> we can see, that the application of redistribution of compressed data between modified DEFLATE blocks made it possible to reduce the total size of compressed images of the ACT set by 3 Kb, although on average it slowed down the encoding by 6.48%. Moreover, a reduction in the size of compressed images is observed both for photorealistic images (№ 4) and for synthesized images (№ 1, 7). Other compressed images are hundreds of bytes smaller. Such modest results are explained by the fact that, firstly, the maximum gain from the combination of adjacent modified DEFLATE blocks is equal to the block header (up to 380 bytes), and secondly, after using difference color models and predictors, these images have a high uneven distribution of element frequencies (Figure <ref type="figure">1b</ref>) and partitioning does not significantly increase their homogeneity and, thirdly, the data of different layers and passes of progressive hierarchical compression are stored in different compressed blocks by default. On the other hand, the redistribution of compressed data between DEFLATE blocks made it possible to speed up decoding by an average of 2.14% due to discrete-tone images, which indicates the feasibility of its use. For example, we use the redistribution of compressed data between modified DEFLATE-blocks in our developed HBF-LS lossless progressive hierarchical image compression format <ref type="bibr" target="#b7">[8]</ref>[10] <ref type="bibr" target="#b19">[20]</ref> when the encoding time is insignificant.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.">Conclusions</head><p>1. Using compressed data formats, which provide for their division into blocks, it is worth analyzing the expediency of combining adjacent blocks and dividing blocks into homogeneous fragments to reduce CR before writing these blocks into a file; 2. The combination of DEFLATE blocks reduces the size of compressed data by a maximum of the size of the header of one such block, and splitting increases the uneven distribution of the relative frequencies of their elements, so these actions should be implemented in image compression programs; 3. The combination of DEFLATE blocks of compressed data makes it possible to speed up decoding by reducing the number of generation intervals or codes of individual elements for each such block.</p><p>In the future, we plan to improve the mechanism of the "lazy" layout of the LZ77 algorithm <ref type="bibr" target="#b7">[8]</ref> by memorizing and using smaller offsets to shorter identical sequences that can be applied in the process of its formation, and to investigate the effectiveness of using the previous layout this algorithm to predict the lengths of literals, lengths of substitutions and offsets.</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">The JPEG still picture compression standard</title>
		<author>
			<persName><forename type="first">G</forename><surname>Wallace</surname></persName>
		</author>
		<idno type="DOI">10.1145/103085.103089</idno>
	</analytic>
	<monogr>
		<title level="j">Communication of ACM</title>
		<imprint>
			<biblScope unit="volume">34</biblScope>
			<biblScope unit="page" from="30" to="44" />
			<date type="published" when="1991">1991</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<title level="m" type="main">Unraveling the JPEG</title>
		<author>
			<persName><forename type="first">O</forename><surname>Shehata</surname></persName>
		</author>
		<ptr target="https://parametric.press/issue-01/unraveling-the-jpeg" />
		<imprint>
			<date type="published" when="2019">2019</date>
			<publisher>Parametric Press</publisher>
			<biblScope unit="volume">1</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">A review of wavelet analysis and its applications: Challenges and opportunities</title>
		<author>
			<persName><forename type="first">T</forename><surname>Guo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Zhang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Lim</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>López-Benítez</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Ma</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Yu</surname></persName>
		</author>
		<idno type="DOI">10.1109/ACCESS.2022.3179517</idno>
	</analytic>
	<monogr>
		<title level="j">IEEE Access</title>
		<imprint>
			<biblScope unit="volume">10</biblScope>
			<biblScope unit="page" from="58869" to="58903" />
			<date type="published" when="2022">2022</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Review on Lossless Compression Techniques</title>
		<author>
			<persName><forename type="first">H</forename><forename type="middle">D</forename><surname>Kotha</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Tummanapally</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><forename type="middle">K</forename><surname>Upadhyay</surname></persName>
		</author>
		<idno type="DOI">10.1088/1742-6596/1228/1/012007</idno>
	</analytic>
	<monogr>
		<title level="j">Journal of Physics</title>
		<imprint>
			<biblScope unit="volume">1228</biblScope>
			<date type="published" when="2019">2019</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<title level="m" type="main">A Guide to Data Compression Methods</title>
		<author>
			<persName><forename type="first">D</forename><surname>Selomon</surname></persName>
		</author>
		<idno type="DOI">10.1007/978-0-387-21708-6</idno>
		<imprint>
			<date type="published" when="2002">2002</date>
			<publisher>Springer</publisher>
			<biblScope unit="page">295</biblScope>
			<pubPlace>New York</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<monogr>
		<title level="m" type="main">Digital Image Processing, Fourth Edition</title>
		<author>
			<persName><forename type="first">R</forename><surname>Gonzalez</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Woods</surname></persName>
		</author>
		<imprint>
			<date type="published" when="1192">2017. 1192</date>
			<pubPlace>Pearson, London</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">A universal algorithm for sequential data compression</title>
		<author>
			<persName><forename type="first">J</forename><surname>Ziv</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Lempel</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Transactions on Information Theory</title>
		<imprint>
			<biblScope unit="volume">23</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="337" to="343" />
			<date type="published" when="1977">1977</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Rejection of the Inefficient Replacements while Forming the Schedule of the Modified Algorithm LZ77 in the Process of Progressive Hierarchical Compression of Images without Losses</title>
		<author>
			<persName><forename type="first">A</forename><surname>Shportko</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Bomba</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Postolatii</surname></persName>
		</author>
		<ptr target="http://ceur-ws.org/Vol-3171/paper113.pdf" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 6th International Conference Computational Linguistics and Intelligent Systems (COLINS 2022)</title>
				<meeting>the 6th International Conference Computational Linguistics and Intelligent Systems (COLINS 2022)<address><addrLine>Glivice, Poland</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2022-05-13">12-13 May 2022</date>
			<biblScope unit="volume">3171</biblScope>
			<biblScope unit="page" from="1594" to="1605" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<monogr>
		<ptr target="https://www.win-rar.com/start.html?&amp;L=0" />
		<title level="m">WinRAR download free and support</title>
				<imprint>
			<date type="published" when="2024">2024</date>
			<biblScope unit="volume">7</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Development of Predictors to Increase the Efficiency of Progressive Hierarchic Context-Independent Compression of Images Without Losses</title>
		<author>
			<persName><forename type="first">A</forename><surname>Shportko</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Postolatii</surname></persName>
		</author>
		<ptr target="http://ceur-ws.org/Vol-2870/paper77.pdf" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 5th International Conference Computational Linguistics and Intelligent Systems (COLINS 2021)</title>
				<meeting>the 5th International Conference Computational Linguistics and Intelligent Systems (COLINS 2021)<address><addrLine>Kharkiv, Ukraine</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2021">Apr. 22-23, 2021</date>
			<biblScope unit="volume">1</biblScope>
			<biblScope unit="page" from="1026" to="1038" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">A Mathematical Theory of Communication</title>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">E</forename><surname>Shannon</surname></persName>
		</author>
		<idno type="DOI">10.1002/j.1538-7305.1948.tb00917.x</idno>
	</analytic>
	<monogr>
		<title level="j">Bell System Technical Journal</title>
		<imprint>
			<biblScope unit="volume">27</biblScope>
			<biblScope unit="page" from="623" to="656" />
			<date type="published" when="1948">1948</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">A Method for the Construction of Minimum Redundancy Codes</title>
		<author>
			<persName><forename type="first">D</forename><surname>Huffman</surname></persName>
		</author>
		<idno type="DOI">10.1109/JRPROC.1952.273898</idno>
	</analytic>
	<monogr>
		<title level="j">Proceedings of the IRE</title>
		<imprint>
			<biblScope unit="volume">40</biblScope>
			<biblScope unit="issue">9</biblScope>
			<biblScope unit="page" from="1098" to="1101" />
			<date type="published" when="1952">1952</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Introduction to Algorithms</title>
		<author>
			<persName><forename type="first">T</forename><forename type="middle">H</forename><surname>Cormen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">E</forename><surname>Leiserson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">L</forename><surname>Rivest</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Stein</surname></persName>
		</author>
		<ptr target="http://mitpress.mit.edu/9780262046305/introduction-to-algorithms" />
	</analytic>
	<monogr>
		<title level="m">Fourth Edition</title>
				<imprint>
			<publisher>MIT Press</publisher>
			<date type="published" when="2022">2022</date>
			<biblScope unit="page" from="431" to="439" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">The use of asymmetric numeral systems as an accurate replacement for Huffman coding</title>
		<author>
			<persName><forename type="first">J</forename><surname>Duda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Tahboub</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><forename type="middle">J</forename><surname>Gadil</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><forename type="middle">J</forename><surname>Delp</surname></persName>
		</author>
		<idno type="DOI">10.1109/PCS.2015.7170048</idno>
	</analytic>
	<monogr>
		<title level="m">Picture Coding Symposium</title>
				<meeting><address><addrLine>Cairns, QLD, Australia</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2015-07-30">Jul. 30, 2015</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<analytic>
		<title level="a" type="main">Lossless image compression techniques: A state-of-the-art survey</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">A</forename><surname>Rahman</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Hamada</surname></persName>
		</author>
		<idno type="DOI">10.3390/sym11101274</idno>
	</analytic>
	<monogr>
		<title level="j">Symmetry</title>
		<imprint>
			<biblScope unit="volume">11</biblScope>
			<biblScope unit="page">1274</biblScope>
			<date type="published" when="2019">2019</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<analytic>
		<title level="a" type="main">Generalized Kraft Inequality and Arithmetic Coding</title>
		<author>
			<persName><forename type="first">J</forename><surname>Rissanen</surname></persName>
		</author>
		<idno type="DOI">10.1147/rd.203.0198</idno>
	</analytic>
	<monogr>
		<title level="j">IBM Journal of Research and Development</title>
		<imprint>
			<biblScope unit="volume">20</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="198" to="203" />
			<date type="published" when="1976">1976</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b16">
	<analytic>
		<title level="a" type="main">Arithmetic coding</title>
		<author>
			<persName><forename type="first">J</forename><surname>Rissanen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><forename type="middle">G</forename><surname>Langdon</surname></persName>
		</author>
		<idno type="DOI">10.1147/rd.232.0149</idno>
	</analytic>
	<monogr>
		<title level="j">IBM Journal of Research and Development</title>
		<imprint>
			<biblScope unit="volume">23</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="149" to="162" />
			<date type="published" when="1979">1979</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b17">
	<analytic>
		<title level="a" type="main">Arithmetic Coding for Data Compression</title>
		<author>
			<persName><forename type="first">I</forename><forename type="middle">H</forename><surname>Witten</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">M</forename><surname>Neal</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">G</forename><surname>Cleary</surname></persName>
		</author>
		<idno type="DOI">10.1145/214762.214771</idno>
	</analytic>
	<monogr>
		<title level="j">Communications of the ACM</title>
		<imprint>
			<biblScope unit="volume">30</biblScope>
			<biblScope unit="issue">6</biblScope>
			<biblScope unit="page" from="520" to="540" />
			<date type="published" when="1987">1987</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b18">
	<analytic>
		<title level="a" type="main">Arithmetic coding revisited</title>
		<author>
			<persName><forename type="first">A</forename><surname>Moffat</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">M</forename><surname>Neal</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><forename type="middle">H</forename><surname>Witten</surname></persName>
		</author>
		<idno type="DOI">10.1145/290159.290162</idno>
	</analytic>
	<monogr>
		<title level="j">ACM Transactions on Information Systems</title>
		<imprint>
			<biblScope unit="volume">16</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="256" to="294" />
			<date type="published" when="1998">1998</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b19">
	<analytic>
		<title level="a" type="main">Features of the application of arithmetic coding in the process of lossless progressive hierarchical compression of images</title>
		<author>
			<persName><forename type="first">A</forename><surname>Ya</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">V</forename><surname>Bomba</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">V</forename><surname>Shportko</surname></persName>
		</author>
		<author>
			<persName><surname>Shportko</surname></persName>
		</author>
		<ptr target="http://nbuv.gov.ua/UJRN/VNULPICM_2014_783_4" />
	</analytic>
	<monogr>
		<title level="m">Series: Information Systems and Networks</title>
				<meeting><address><addrLine>Lviv Polytechnic</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2014">2014</date>
			<biblScope unit="volume">783</biblScope>
			<biblScope unit="page" from="12" to="22" />
		</imprint>
	</monogr>
	<note>Proceedings of the National University</note>
</biblStruct>

<biblStruct xml:id="b20">
	<monogr>
		<author>
			<persName><forename type="first">P</forename><surname>Deutsch</surname></persName>
		</author>
		<ptr target="https://www.rfc-editor.org/rfc/rfc1951" />
		<title level="m">DEFLATE Compressed Data Format Specification, version 1.3</title>
				<imprint>
			<date type="published" when="1951">1951</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b21">
	<monogr>
		<author>
			<persName><forename type="first">P</forename><surname>Deutsch</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J-L</forename><surname>Gailly</surname></persName>
		</author>
		<ptr target="http://www.ietf.org/rfc/rfc1950.txt" />
		<title level="m">ZLIB Compressed Data Format Specification, version 3.3, RFC 1950</title>
				<imprint>
			<publisher>Network Working Group</publisher>
			<date type="published" when="1996">1996</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b22">
	<monogr>
		<title level="m" type="main">Compressed Image File Format: JPEG, PNG, GIF, XBM, BMP</title>
		<author>
			<persName><forename type="first">J</forename><surname>Miano</surname></persName>
		</author>
		<imprint>
			<date type="published" when="1999">1999</date>
			<publisher>Addison Wesley</publisher>
			<biblScope unit="page">264</biblScope>
			<pubPlace>New York</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b23">
	<monogr>
		<author>
			<persName><forename type="middle">P</forename><surname>Yu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><forename type="middle">P</forename><surname>Zhurakovskyi</surname></persName>
		</author>
		<author>
			<persName><surname>Poltorak</surname></persName>
		</author>
		<ptr target="https://b.eruditor.link/file/348269" />
		<title level="m">Teoriia informatsii ta koduvannia, Vyshcha shkola</title>
				<meeting><address><addrLine>Kyiv</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2001">2001</date>
			<biblScope unit="page">33</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b24">
	<analytic>
		<title level="a" type="main">Compression by PPM + Arithmetic Coder C# implementation (based on C++ algorithm from the book</title>
		<ptr target="https://gist.github.com/Geograph-us/a1beae713c337243c478cb5575a22f75" />
	</analytic>
	<monogr>
		<title level="m">Data Compression Methods</title>
				<imprint>
			<date type="published" when="2022">2022</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b25">
	<monogr>
		<title level="m" type="main">Rise of efficiency of compression of coloured images in the PNG format</title>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">V</forename><surname>Shportko</surname></persName>
		</author>
		<ptr target="https://dspace.megu.edu.ua:8443/jspui/handle/123456789/1665" />
		<imprint>
			<date type="published" when="2010">2010</date>
			<biblScope unit="page" from="83" to="85" />
			<pubPlace>Rivne</pubPlace>
		</imprint>
		<respStmt>
			<orgName>Rivne State University of the Humanities</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">Ph.D. thesis</note>
</biblStruct>

<biblStruct xml:id="b26">
	<monogr>
		<ptr target="http://www.compression.ca/act/act-files.html" />
		<title level="m">ACT -Test Files</title>
				<imprint>
			<date type="published" when="2002">2002</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
