def get_alt_binary(f, func, blocksize):
    while 1:
        data = f.read(blocksize)
        if not data:
            break
        func(data)
Get a binary file and pass each block to a function.
dataset/ETHPy150Open babble/babble/include/jython/Lib/gopherlib.py/get_alt_binary