writeBytes method

Uint8List writeBytes({
  1. required P profile,
  2. required BodyTemperatureRecordListCsv<N> btr,
  3. List<TempcordDataConvertedObject<Object>>? addition,
})

Write TempcordDataConvertedObject to Uint8List with lzma compression.

addition will be used if applied addition TempcordDataConverter on constructor and should be exact same order between the converter and corresponded object.

Implementation

Uint8List writeBytes(
        {required P profile,
        required BodyTemperatureRecordListCsv<N> btr,
        List<TempcordDataConvertedObject<Object>>? addition}) =>
    UnmodifiableUint8ListView(Uint8List.fromList(lzma.encode(utf8.encode(
        _dataToStr(<TempcordDataConvertedObject>[profile, btr]
          ..addAll(addition ?? <TempcordDataConvertedObject>[]))))));