my $packaged_data = pack("n", $piece_one_six_bits << (6 + 4) | $piece_two_six_bits << 4 | $piece_three_four_bits );