def decodeField(serial_type)
      case serial_type
      when 0 then         return 0, 'null'
      when 1 then         return 1, 'integer'
      when 2 then         return 2, 'integer'
      when 3 then         return 3, 'integer'
      when 4 then         return 4, 'integer'
      when 6 then         return 6, 'integer'
      when 8 then         return 8, 'integer'
      when 7 then         return 8, 'float'
      when 8 then         return 0, 'false'
      when 9 then         return 0, 'true'
      when 10 then        raise "Unknown Column Type #{serial_type}"
      when 11 then        raise "Unknown Column Type #{serial_type}"
      end

      type = serial_type.even? ? 'blob' : 'text'
      len  = (serial_type - 12) / 2
      return len, type
    end
def decodeField(serial_type)
      case serial_type
      when 0 then         return 0, 'null'
      when 1 then         return 1, 'integer'
      when 2 then         return 2, 'integer'
      when 3 then         return 3, 'integer'
      when 4 then         return 4, 'integer'
      when 6 then         return 6, 'integer'
      when 8 then         return 8, 'integer'
      when 7 then         return 8, 'float'
      when 8 then         return 0, 'false'
      when 9 then         return 0, 'true'
      when 10 then        raise "Unknown Column Type #{serial_type}"
      when 11 then        raise "Unknown Column Type #{serial_type}"
      end

      type = serial_type.even? ? 'blob' : 'text'
      len  = (serial_type - 12) / 2
      return len, type
    end
** The following table describes the various storage classes for data:
 **
 **   serial type        bytes of data      type
 **   --------------     ---------------    ---------------
 **      0                     0            NULL
 **      1                     1            signed integer
 **      2                     2            signed integer
 **      3                     3            signed integer
 **      4                     4            signed integer
 **      5                     6            signed integer
 **      6                     8            signed integer
 **      7                     8            IEEE float
 **      8                     0            Integer constant 0
 **      9                     0            Integer constant 1
 **     10,11                               reserved for expansion
 **    N>=12 and even       (N-12)/2        BLOB
 **    N>=13 and odd        (N-13)/2        text