def store_blob(address, bytes)
      unless address >= 0
        PEROBS.log.fatal "Blob storage address must be larger than 0, " +
          "not #{address}"
      end
      if bytes.length != @entry_bytes
        PEROBS.log.fatal "All stack entries must be #{@entry_bytes} " +
          "long. This entry is #{bytes.length} bytes long."
      end

      marker = 1
      begin
        offset = address_to_offset(address)
        if offset > (file_size = @f.size)
          PEROBS.log.fatal "Cannot store blob at address #{address} in " +
            "EquiBlobsFile #{@file_name}. Address is larger than file size. " +
            "Offset: #{offset}  File size: #{file_size}"
        end

        @f.seek(offset)
        # The first byte is the marker byte. It's set to 2 for cells that hold
        # a blob. 1 for reserved cells and 0 for empty cells. The cell must be
        # either already be in use or be reserved. It must not be 0.
        if file_size > offset &&
           (marker = read_char) != 1 && marker != 2
          PEROBS.log.fatal "Marker for entry at address #{address} of " +
            "EquiBlobsFile #{@file_name} must be 1 or 2 but is #{marker}"
        end
        @f.seek(offset)
        write_char(2)
        @f.write(bytes)
        @f.flush
      rescue IOError => e
        PEROBS.log.fatal "Cannot store blob at address #{address} in " +
          "EquiBlobsFile #{@file_name}: #{e.message}"
      end

      # Update the entries counter if we inserted a new blob.
      if marker == 1
        @total_entries += 1
        write_header
      end
    end
def store_blob(address, bytes)
      unless address >= 0
        PEROBS.log.fatal "Blob storage address must be larger than 0, " +
          "not #{address}"
      end
      if bytes.length != @entry_bytes
        PEROBS.log.fatal "All stack entries must be #{@entry_bytes} " +
          "long. This entry is #{bytes.length} bytes long."
      end

      marker = 1
      begin
        offset = address_to_offset(address)
        if offset > (file_size = @f.size)
          PEROBS.log.fatal "Cannot store blob at address #{address} in " +
            "EquiBlobsFile #{@file_name}. Address is larger than file size. " +
            "Offset: #{offset}  File size: #{file_size}"
        end

        @f.seek(offset)
        # The first byte is the marker byte. It's set to 2 for cells that hold
        # a blob. 1 for reserved cells and 0 for empty cells. The cell must be
        # either already be in use or be reserved. It must not be 0.
        if file_size > offset &&
           (marker = read_char) != 1 && marker != 2
          PEROBS.log.fatal "Marker for entry at address #{address} of " +
            "EquiBlobsFile #{@file_name} must be 1 or 2 but is #{marker}"
        end
        @f.seek(offset)
        write_char(2)
        @f.write(bytes)
        @f.flush
      rescue IOError => e
        PEROBS.log.fatal "Cannot store blob at address #{address} in " +
          "EquiBlobsFile #{@file_name}: #{e.message}"
      end

      # Update the entries counter if we inserted a new blob.
      if marker == 1
        @total_entries += 1
        write_header
      end
    end
Store the given byte blob at the specified address. If the blob space is
 already in use the content will be overwritten.
 @param address [Integer] Address to store the blob
 @param bytes [String] bytes to store