import 'dart:typed_data';

int fromBytesToInt32(int b3, int b2, int b1, int b0) {
  final int8List = Int8List(4)
    ..[3] = b3
    ..[2] = b2
    ..[1] = b1
    ..[0] = b0;
  return int8List.buffer.asByteData().getInt32(0);
}

int fromBytesToInt64(
  int b7,
  int b6,
  int b5,
  int b4,
  int b3,
  int b2,
  int b1,
  int b0,
) {
  final int8List = Int8List(8)
    ..[7] = b7
    ..[6] = b6
    ..[5] = b5
    ..[4] = b4
    ..[3] = b3
    ..[2] = b2
    ..[1] = b1
    ..[0] = b0;
  return int8List.buffer.asByteData().getInt64(0);
}
