# Compression of Multibeam Echosounders Bathymetry and Water Column Data
## 5 Test Setup  
In the following tests and in the preliminary data analysis, we have used three different datasets: the first one, provided by Kongsberg Maritime, contains 40 files (20.kmall + 20.kmwcd) acquired by an EM304. These files contain 8-bit phase samples. The second one, also provided by Kongsberg Maritime, contains 52 files (26 + 26) acquired by an EM2040 echosounder and six files from an EM712 (3 + 3). The last dataset contains five files from an EM304 acquired by Fugro over a salt dome with known plumes in the Gulf of Mexico. The peculiarity of this last dataset is that both MWC and MRZ datagrams are contained in the same.kmall file.  
If we want to consider real-time compression, we must take into account the throughput of each MBES and ensure the compression speed (also referred to as compression throughput) is higher. The data rate of an echosounder depends on the ping rate and thus on the water depth (see Section 2). Other features such as the number of beams or the backscatter samples resolution also have an effect. In Table 1, we show the mean data rates and depth in the acquisition of the three datasets.  
For the lossless data compression tests, we have decided to compare FAPEC with _gzip_, _bzip_2 and _Zstd_, using their default options. _Gzip_ is a well-known compressor used in Linux and macOS, equivalent to _Zip_, which uses a combination of LZ77 [18] and Huffman [19] to perform encoding. _Bzip_2 is an alternative to _gzip_, often slower but typically leading to better compression ratios. It uses the Burrows-Wheeler transform [20] followed by Huffman coding. Finally, _Zstd_ is a compressor, which typically yields ratios comparable to those of _gzip_, but much faster. It combines LZ77, Finite State Entropy [21] and Huffman coding.  
Note that, in the market, there are no lossy algorithms for KMALL data except for the one we present in this paper. For this reason, lossy compression has been evaluated by means of ratios, quality (PSNR) and visualization.  
For a fair comparison of compressing time, we have forced a single thread operation for FAPEC and _Zstd_. _Gzip_ and _bzip_2 already operate with one thread by default. All tests were run on a computer with Intel Xeon CPU E5-2630 v3 2.40 GHz running 64-bit CentOS 7.9. The complexity of the algorithm has been evaluated using Valgrind.  
From all the files in our dataset, we have chosen two (one from the EM2040 dataset and one with phase from the EM304 dataset), and we have plotted the histogram of the  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline  & **D1-EM304** & **D2-EM712** & **D2-EM2040** & **D3-EM304** \\ \hline Depth (m) & 190 & 190 & 15 & 1000 \\ KMALL data rate (MB/h) & 492 & 731 & 2448 & 1347 \\ KMALL max. size (MB) & 53 & 123 & 292 & 978 \\ KMWCD data rate (MB/h) & 1932 & 2700 & 3224 & - \\ KMWCD max. size (MB) & 1362 & 453 & 1871 & - \\ \hline \hline \end{tabular}
\end{table}
Table 1: Data rates, depth and maximum file sizes for the datasets used in this paper.  
prediction errors after the pre-processing step (before the entropy coder). It allows us to evaluate the performance of the algorithm without the constraints of any entropy coder.