I'm a little new to GNURadio, so sorry if this question sounds dumb. I'm using GNURadio18.104.22.168. I read about how metadata worked from https://www.gnuradio.org/doc/doxygen/page_metadata.html
and wanted to try it out. I have a file metadata sink directly downstream from a block where I insert tags if I detect a frame. I modified the gr_read_file_metadata.py file to return the headers in an array. In a separate Python2.7 program, I use a really simple loop and add all the header lengths (hdr_len) and size_in_bytes. Theoretically, I thought this would match the size in bytes of the whole file, but it doesn't. Instead, there's about a 270 kB difference between the two data sizes. Usually, the actual length is longer, but sometimes it will be the headers.
Is there any reason for this like data in the binary file that is not accounted for in the headers? I've tried using detached headers (adding only size_in_bytes of course), but the same event occurs.