Package: kameris-formats
kameris-formatsThese are implementations of readers and writers for the file formats used bykameris-backend, for the following languages:LanguageLocationNotesC++cpp/Header-only, requireslibkamerisPythonpython/On PyPI:File formatsThere are two different file formats used to store program output.reprmode generates files with the extension.mm-repranddistmode generates files with the extension.mm-dist.Data is always stored in little-endian format. All header values except the signature are unsigned integers.element_typeis a common enum used to specify the type of the stored data. Its values are as follows:ValueNameElement size (bytes)Description0uint818-bit unsigned integer1uint16216-bit unsigned integer2uint32432-bit unsigned integer3uint64864-bit unsigned integer4float324IEEE 754 single-precision floating point5float648IEEE 754 double-precision floating pointreprformat (.mm-reprfiles)HeaderStartEndSize (bytes)NameDescription0x000x056signatureFile signature, always "MMREPR"0x060x061versionAlways 00x070x071is_sparseWhether the matrices are sparse (0 or 1)0x080x081key_typeThe type of matrix keys as anelement_type, unused ifis_sparseis 00x090x091value_typeThe type of matrix values as anelement_type0x0A0x118countNumber of matrices0x120x198rowsNumber of rows for each matrix0x1A0x218columnsNumber of columns for each matrix0x228 *countsizes(Only ifis_sparseis 1) Number of non-zero entries for each matrixIf the sparse flag is not set, the followingcount*rows*columns* (size forvalue_type) bytes are the entries, in row-major order, for each of thecountmatrices, one after the other.If the sparse flag is set, each of thecountmatrices, one after the other, is stored as (the matrix size fromsizes) * (size forkey_type) * (size forvalue_type) bytes which are (the matrix size fromsizes) pairs of key followed by value. The order of keys is unspecified.distformat (.mm-distfiles)HeaderStartEndSize (bytes)NameDescription0x000x056signatureFile signature, always "MMDIST"0x060x061versionAlways 00x070x071value_typeThe type of matrix values as anelement_type0x080x0F8sizeNumber of rows = columns of the matrixThe following (size* (size- 1)) / 2 * (size forvalue_type) bytes are the entriesabovethe main diagonal, in row-major order, of the matrix. The matrix is assumed to be symmetric and have zeros on the main diagonal.LicenseThe MIT License (MIT)

Copyright (c) 2017 Stephen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.