+// remember which version of the bitstream we have already downloaded to the FPGA
+static int downloaded_bitstream = FPGA_BITSTREAM_ERR;
+
+// this is where the bitstreams are located in memory:
+extern uint8_t _binary_fpga_lf_bit_start, _binary_fpga_lf_bit_end;
+extern uint8_t _binary_fpga_hf_bit_start, _binary_fpga_hf_bit_end;
+static uint8_t *fpga_image_ptr = NULL;
+
+static const uint8_t _bitparse_fixed_header[] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x01};
+static const uint8_t _gzip_header[] = {0x1f, 0x8b, 0x08}; // including compression method 0x08 (deflate)
+#define GZIP_HEADER_SIZE sizeof(_gzip_header)
+#define FPGA_BITSTREAM_FIXED_HEADER_SIZE sizeof(_bitparse_fixed_header)
+