**Kevin Chow \*, Dion Eustathios Olivier Tzamarias, Miguel Hernández-Cabronero, Ian Blanes and Joan Serra-Sagristà**

Department of Information and Communications Engineering, Universitat Autònoma de Barcelona, 08193 Cerdanyola del Vallès, Barcelona, Spain; dion.tzamarias@uab.cat (D.E.O.T.); miguel.hernandez@uab.cat (M.H.-C.); ian.blanes@uab.cat (I.B.); joan.serra@uab.cat (J.S.-S.)

**\*** Correspondence: kevin.chow@uab.cat

Received: 19 May 2020; Accepted: 18 June 2020; Published: 20 June 2020

**Abstract:** This paper examines the various variable-length encoders that provide integer encoding to hyperspectral scene data within a *k*2-raster compact data structure. This compact data structure leads to a compression ratio similar to that produced by some of the classical compression techniques. This compact data structure also provides direct access for query to its data elements without requiring any decompression. The selection of the integer encoder is critical for obtaining a competitive performance considering both the compression ratio and access time. In this research, we show experimental results of different integer encoders such as Rice, Simple9, Simple16, PForDelta codes, and DACs. Further, a method to determine an appropriate *k* value for building a *k*2-raster compact data structure with competitive performance is discussed.

**Keywords:** compact data structure; *k*2-raster; DACs; Elias codes; Simple9; Simple16; PForDelta; Rice codes; hyperspectral scenes

#### **1. Introduction**

Hyperspectral scenes [1–10] are data taken from the air by sensors such as AVIRIS (Airborne Visible/Infrared Imaging Spectrometer) or by satellite instruments such as Hyperion and IASI (Infrared Atmospheric Sounding Interferometer). These scenes are made up of multiple bands from across the electromagnetic spectrum, and data extracted from certain bands are helpful in finding objects such as oil fields [11] or minerals [12]. Other applications include weather prediction [13] and wildfire soil studies [14], to name a few. Due to their sizes, hyperspectral scenes are usually compressed to facilitate their transmission and reduce storage size.

Compact data structures [15] are a type of data structure where data are stored efficiently while at the same time providing real-time processing and compression of the data. They can be loaded into main memory and accessed directly by means of the rank and select functions [16] in the structures. Compressed data provide reduced space usage and query time, i.e., they allow more efficient transmission through limited communication channels, as well as faster data access. There is no need to decompress a large portion of the structure to access and query individual data as is the case with data compressed by classical compression algorithms such as gzip or bzip2 and by specialized algorithms such as CCSDS123.0-B-1 [17] or KLT+JPEG 2000 [18,19]. In this paper, we are interested in lossless compression of hyperspectral scenes through compact data structures. Therefore, reconstructed scenes should be identical to the originals before compression. Any deterministic analysis process will necessarily yield the same results. Figure 1 shows several images from our datasets.

(**d**) AIRS Gran 6 (Band 1256) (**e**) AIRS Gran 120 (Band 256) (**f**) Yellowstone 00 (uncal.)

**Figure 1.** Several hyperspectral scenes used in this paper. The original and the decompressed scenes discussed in this paper are numerically identical. Depicted also are two spectral signatures for AVIRIS Yellowstone 00 (uncal.). The AVIRIS images in this figure are courtesy of NASA/JPL-Caltech.

The compact data structure used in this paper is called *k*2-raster. It is a tree structure developed from another compact data structure called *k*2-tree. *k*2-raster is built from a raster matrix with its pixel cells filled with integer values, while *k*2-tree is from a bitmap matrix with zero and one values. During the construction of the *k*2-raster tree, if the neighboring pixels have equal values such as clusters (spatial correlation), the number of nodes in the tree that need to be saved is reduced. If the values are similar, as discussed later in this paper, the values will be made even smaller. They are then compressed or packed in a more compact form by the integer encoders, and with these small integers, the compression results are even better. Moreover, when it comes to querying cells, a tree structure speeds up the search, saving access time. Another added advantage of some of the integer encoders is that they provide direct random access to the cells without any need for full decompression.

Currently, huge amounts of remote sensing data have been produced, transmitted, and archived, and we can foresee that in the future, the amount of larger datasets is expected to keep growing at a fast rate. The need for their compression is becoming more pressing and critical. In view of this trend, we take on the task of remote sensing compression and make it as one of our main objectives. In this research work, we reduce hyperspectral data sizes by using compact data structures to produce lossless compression. Early on, we began by examining the possibility of taking advantage of the spatial correlation and spectral correlation in the data. In our previous paper [20], we presented a predictive method and a differential method that made use of these correlations in hyperspectral data with favorable results. However, in this paper, we would like to focus on selecting a suitable integer encoder that is employed in the *k*2-raster compact data structure, as that is also a major factor in providing competitive compression ratios.

Compression of integer data in the most effective and efficient way, in relation to compact data structures, has been the focus of many studies over the past several decades. Some include Elias [21–23], Rice [24–26], PForDelta [27–29], and Directly Addressable Codes (DACs) [30–32]. In our case, we need to store non-negative, typically small integers in the *k*2-raster structure. This structure is a tree built in such a way that the nodes are not connected by pointers, but can still be reached with the use of a compact data structure linear rank function. When the data are saved, no pointers need to be stored, thus keeping the size of the structure small. Additionally, we use a fixed code ([15], §2.7) to help us save even more space. In what follows, we investigate the effectiveness of some of these integer encoders.

The rest of the paper is organized as follows: In Section 2, we describe the *k*2-raster structure, followed by the various variable-length integer encoders such as Elias, Rice, PForDelta, and DACs. Section 3 presents experimental results for finding the best and optimal values for *k* and exploring the different integer encoders for *k*2-raster. This is done in comparison with classical compression techniques. Lastly, some conclusions and final thoughts on future work are put forth in Section 4.

#### **2. Materials and Methods**

In this section, we describe *k*2-raster [33] and the integer encoders Elias, Rice, Simple9, Simple16, PForDelta codes, and DACs. This is followed by a discussion on how to obtain the best value of *k* and two related works on raster compression: heuristic *k*2-raster [33] and 3D-2D mapping [34].
