anchor.diff:      const FMT_SINGLE = 11;
       const FMT_DOUBLE = 12;
   
  -    switch (format) {
  -      case FMT_SBYTE:
  -        return block.readInt8();
  -      case FMT_BYTE:
  -        return block.readByte();
  -      case FMT_USHORT:
  -        return block.readUint16();
  -      case FMT_ULONG:
  -        return block.readUint32();
  -      case FMT_URATIONAL:
  -      case FMT_SRATIONAL:
  -        {
  -          var num = block.readInt32();
  -          var den = block.readInt32();
  -          if (den == 0) {
  -            return 0.0;
  +    int initialBlockLength = block.length;
  +    try {
  +      switch (format) {
  +        case FMT_SBYTE:
  +          return block.readInt8();
  +        case FMT_BYTE:
  +          return block.readByte();
  +        case FMT_USHORT:
  +          return block.readUint16();
  +        case FMT_ULONG:
  +          return block.readUint32();
  +        case FMT_URATIONAL:
  +        case FMT_SRATIONAL:
  +          {
  +            InputBuffer buffer = block.peekBytes(8, offset);
  +            var num = buffer.readInt32();
  +            var den = buffer.readInt32();
  +            if (den == 0) {
  +              return 0.0;
  +            }
  +            return num / den;
             }
  -          return num / den;
  -        }
  -      case FMT_SSHORT:
  -        return block.readInt16();
  -      case FMT_SLONG:
  -        return block.readInt32();
  +        case FMT_SSHORT:
  +          return block.readInt16();
  +        case FMT_SLONG:
  +          return block.readInt32();
         // Not sure if this is correct (never seen float used in Exif format)
  -      case FMT_SINGLE:
  -        return block.readFloat32();
  -      case FMT_DOUBLE:
  -        return block.readFloat64();
  -      default:
  -        return 0;
  +        case FMT_SINGLE:
  +          return block.readFloat32();
  +        case FMT_DOUBLE:
  +          return block.peekBytes(8, offset).readFloat64();
  +        default:
  +          return 0;
  +      }
  +    } finally {
  +      int bytesRead = initialBlockLength - block.length;
  +      if (bytesRead < 4) {
  +        block.skip(4 - bytesRead);
  +      }
       }
     }
   
  
positive.code: 
        var byteCount = bytesPerFormat[format];
  
        // If its bigger than 4 bytes, the dir entry contains an offset.
        if (byteCount > 4) {
          var offset = block.readUint32();
          if (offset + byteCount > block.length) {
            continue; // Bogus pointer offset and / or bytecount value
          }
  
negative.code:     return c;
    }
  
    num _readExifValue(InputBuffer block, int format, int offset) {
      const FMT_BYTE = 1;
      //const FMT_STRING = 2;
      const FMT_USHORT = 3;
  