Serial port reading: data format unclear
It seems like the mystery data format is the official USB HID keypress format: https://wiki.osdev.org/USB_Human_Interface_Devices

The first eight bytes which are read correspond to a key press event (the value for a keypress is according to the USB HID usage tables for keyboards):

Offset  Size    Description
0       Byte    Modifier keys status.
1       Byte    Reserved field.
2       Byte    Keypress #1.
3       Byte    Keypress #2.
4       Byte    Keypress #3.
5       Byte    Keypress #4.
6       Byte    Keypress #5.
7       Byte    Keypress #6.


The next eight bytes correspond to the state after a key depress event; the barcode reader always "reads" one "pressed" key, so, after it was "depressed", nothing is pressed anymore and these eight bytes are all zero.

As an example that ties it together, I read a QR code based on the text 'abc'. From the USB HID usage tables for keyboards, we know that the hex value for 'a' is 04h, for 'b' it's 05h, and for 'c' it's 06h; sure enough, this is what the device outputs when reading this QR code:

$ sudo hexdump -C /dev/hidraw0
00000000  00 00 04 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 05 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 06 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 28 00 00 00 00 00  00 00 00 00 00 00 00 00  |..(.............|
00000040  00 00 51 00 00 00 00 00  00 00 00 00 00 00 00 00  |..Q.............|


The final two values 28h and 51h are the only part that I don't fully understand yet (in the USB HID usage table, 28h is 'Keyboard Return' and 51h is 'Keyboard DownArrow'). However, they seem to be sent at the end of any barcode/QR code read, so they don't pose any problems.