# Compression of Multibeam Echosounders Bathymetry and Water Column Data
## 1 Introduction  
Advances in sonar and computing technologies have led to major advances in ocean exploration over the last decades. In addition to bathymetric and seafloor reflectivity data, Multibeam Echosounders (MBES) are now capable of imaging the water column. This new mapping capability has introduced new techniques for marine research, including the direct mapping of fish shoals, gas seeps or other mid-water column targets [1, 2]. Some MBES even support multi-frequency data acquisition in combination with water column data, hence increasing their detection capability [3, 4]. Concurrently, ping rates and the number of beams in new multibeam sonars continuously increase. All these improvements in MBES technology imply high data acquisition rates and encompass the massive collection of data, which can easily be one order of magnitude larger than those in standard bottom detectionbathymetric surveys. This poses technical and logistical challenges to MBES users that, for this reason, often opt to systematically turn off the recording of water column data [5]. Moreover, this fact limits the autonomy of unmanned surface and underwater vehicles due to data storage needs and battery drain, and it dramatically increases the cost of remote assistance relying on expensive satellite communications.  
A potential solution to this challenging question in ocean research is data compression. For this reason, there are some studies addressing this problem [6; 7; 8; 9]. However, only a few propose lossless algorithms [10; 11; 12]. In Reference [11], the authors focus on the MBES data from the manufacturer RESON, which stores samples in linear units. As part of their algorithm, [PERSON] et al. [11] propose converting them to decibels with a 0.5 dB precision, which is higher than the precision of the echosounder, hence guaranteeing a lossless compression. In the following sections, we will see that this step is not always needed, as some manufacturers, such as Kongsberg Maritime, already store samples logarithmically and with a resolution of 0.5 dB.  
In Reference [12], a tailored and optimized solution to compress MBES data based on stream partitioning was presented. This consisted of adding a new stage to the Fully Adaptive Prediction Error Coder (FAPEC), a compressor for space applications. In their case, [PERSON] et al. [12] focused on the Water Column Data (WCD) from Kongsberg Maritime. However, in 2019, with the introduction of the latest generation of EM-series multibeam sonars, this manufacturer released a new data format called KMALL. The format contains high-resolution data, is structured in datagrams containing different kinds of data, and is generic enough to facilitate future updates. Due to its novelty, no tailored compression algorithms have been developed yet.  
In this paper, we focus on developing an algorithm to compress the water column data from the KMALL format. In addition, we also perform an analysis of several.kmall files and propose a new algorithm for the datagrams that contain bathymetry data.  
This paper is structured as follows. Section 2 explains the KMALL data format. As will be shown hereafter, KMALL compression has been tackled in a relatively generic manner that could be applied to other formats or vendors as well. Section 3 provides a brief description of the FAPEC data compressor. Section 4.1 describes the data analysis performed before designing the algorithm. Sections 4.2-4.6 present the implementation of the bespoke pre-processing stage. Section 5 describes the test files and software used. Section 6 shows the results of the proposed algorithm. Finally, Section 7 presents our conclusions and states future work lines.