Delphi function comparing content of two TStream?
问题 I need to compare if two TStream descendant have the same content . The only interesting result for me is the boolean Yes / No. I'm going to code a simple loop checking byte after byte the streams content's. But I'm curious to know if there is an already existing function. I haven't found any inside DelphiXE or JCL/JVCL libs. Of course, the two streams have the same size ! 回答1: Exactly, as Nickolay O. said you should read your stream in blocks and use CompareMem. Here is an example (including