public static byte[] patchFast(InputStream oldInputStream,int oldsize,byte[] diffBytes,int extLen) throws IOException {
  byte[] oldBuf=new byte[oldsize];
  BSUtil.readFromStream(oldInputStream,oldBuf,0,oldsize);
  oldInputStream.close();
  return BSPatch.patchFast(oldBuf,oldsize,diffBytes,diffBytes.length,extLen);
}

public static byte [ ] patchFast ( InputStream oldInputStream , int oldsize , byte [ ] diffBytes , int extLen ) throws IOException { byte [ ] oldBuf = new byte [ oldsize ] ; BSUtil . readFromStream ( oldInputStream , oldBuf , 0 , oldsize ) ; oldInputStream . close ( ) ; return BSPatch . patchFast ( oldBuf , oldsize , diffBytes , diffBytes . length , extLen ) ; }
this patch method is fast , but using more memory . memory size = oldbuf + diffbuf + newbuf
