Skip to content

Instantly share code, notes, and snippets.

@enzzc
Created April 30, 2018 16:27
Show Gist options
  • Save enzzc/b08b8a5d249c62f364ebf53864dd454f to your computer and use it in GitHub Desktop.
Save enzzc/b08b8a5d249c62f364ebf53864dd454f to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
# sc: size count
import sys
BUF_READ_SIZE = 2**24
buf_size = 0
buf = None
while buf != b'':
buf = sys.stdin.buffer.raw.read(BUF_READ_SIZE)
buf_size += len(buf)
print(buf_size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment