smart_arrays_compress 2.0.0 copy "smart_arrays_compress: ^2.0.0" to clipboard
smart_arrays_compress: ^2.0.0 copied to clipboard

outdated

Compresses large one- or two-dimensional arrays (vectors, matrices) to a reduced format retaining minimum and maximum values, e.g. for displaying polylines, contours, 3D surfaces.

Smart Arrays Compress #

What the package can do for you #

The compression algorithms provided by this package don't have anything to do with audio or video compression. Instead, their purpose is to reduce large arrays to a size suitable for fast interactive viewing on a screen by retaining significant aspects of the array data. For this purpose an array is fragmented into intervals (1D) or submatrices (2D). The minimum and maximum values in these regions constitue the compressed array. You would apply the algorithms to arrays with thousands, ten thousands or even millions of elements. The reduced size should, for example, be chosen to match display resolution if compression is applied for data viewing.

The major API functionalities #

  • class CompressedArray1D

This example will compress the large specified 1D array to a size of 200 points:

CompressedArray1D c1d = CompressedArray1D.compress(array, 0, array.length - 1, false, 200);

The result is available in c1d.cArray.

  • class CompressedArray2D:

This example will compress the large specified 2D array to a size of 200 x 500 points:

CompressedArray2D c2d = CompressedArray2D();

c2d.compress(matrix, 0, matrix.length - 1, 0, matrix[0].length - 1, 200, 500, true);

The result is available in c2d.cvalsPos and c2d.cvalsNeg.

Detailed API

Please view the detailed API documentation in the API reference of this package (sidebar at the right of this page).

Using this package #

You need Dart 2.0 or later.

Import the package using:

  • import 'package:smart_arrays_compress/smart_arrays.dart_compress';
0
likes
0
pub points
16%
popularity

Publisher

verified publisherhiveright.tech

Compresses large one- or two-dimensional arrays (vectors, matrices) to a reduced format retaining minimum and maximum values, e.g. for displaying polylines, contours, 3D surfaces.

Homepage

License

unknown (LICENSE)

Dependencies

build_runner, build_web_compilers, pedantic, smart_arrays_base

More

Packages that depend on smart_arrays_compress