Improve SkipNBytes to RandomInputStream (#14557)
* Convert SkipNBytes in InputStreamInterface to pure virtual This fix tries to address the issue raised in 14512 where SkipNBytes will takes a long time as it needs to read through the file even though it is possible to random access. This fix convert SkipNBytes in InputStreamInterface to pure virtual so that it is possible to have different implementations based on the underlying file type (seekable vs. no seekable) This fix fixes 14512. Signed-off-by:Yong Tang <yong.tang.github@outlook.com> * Add missing implementation in inputstream_interface_test.cc Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Update implementation of RandomInputStream So that if random access read of 1 byte to the expected pos is able to complete then return immediately. Otherwise, read through until the pos is reached. Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Add SkipNBytes to SnappyInputBuffer Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Remove inputstream_interface.cc from makefile Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Remove pure virtual and use override for RandomInputStream Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
Loading
Please sign in to comment