serializeData method

  1. @override
Uint8List serializeData()
override

Implementation

@override
Uint8List serializeData() {
  final bytesBuilder = BytesBuilder(copy: false);

  for (var e in entries) {
    bytesBuilder
      ..add(ascii.encode(e.mode.toString()))
      ..addByte(asciiHelper.space)
      ..add(utf8.encode(e.name))
      ..addByte(0x00)
      ..add(e.hash.bytes);
  }

  return bytesBuilder.toBytes();
}