from typing import List
import struct


def serialize_record_pack(records: List[bytes]) -> bytes:
    """
    num_records len_rec1 raw_rec1 len_rec2 raw_rec2 ... len_recN raw_recN
    """
    raw_num_records = struct.pack(f'<i', len(records))
    raw_records = [b''.join([struct.pack(f'<Q', len(rec)), rec]) for rec in records]
    return b''.join([raw_num_records, *raw_records])