add chunkMemoryAllocator, chunkStream and fileStream
fix bug when resuming file stream
remove the unstable optimization in file read stream
api compatibility