File compressing

When deleting from the data file (both coordinates and measured data), the cancelled items are only marked as deleted, but they still remain in the data file. Therefore, after complicated operations and points transfer, the coordinate list can be empty or contain only few points, but it is still taking some-times even few tens or hundreds of KB on the disc. In such case, it is appropriate to perform a data file compression. During the compression, the original data file is renamed to a backup file (.~cr), and a new data file (.crd) is created which doesn't contain the previously deleted items.

It is also suitable to perform the data file compression for other reasons. For example, if a coordinate list is imported (e.g. from a text file) with unsorted points, its indexing can (especially if it is larger) take quite a long time. If, during the further work, the index will be file defected or deleted, the entire tedious indexing must be done from scratch. When compressing the file, the points are written sorted according to numbers and, in this case, any prospective indexing will take far less time. After importing an unsorted list or, eventually, after a more complex addition to the list during a calculation, it is suitable to compress the data file.