def find_blocksize(file_len):
    """Return a reasonable block size to use on files of length file_len

    If the block size is too big, deltas will be bigger than is
    necessary.  If the block size is too small, making deltas and
    patching can take a really long time.

    """
    if file_len < 4096:
        return 64
    else:
        return int(pow(file_len, 0.5) / 16) * 16
