Separate in/out buf sizes, fix memory leak
Sorry but there's a lot of mixing of different integer widths. @geraldcombs
I think all buffer offsets etc should be in gsize
/gssize
(size of pointer) and file offsets in gint64
(for largefile support on 32bit).
Edited by Erik Rigtorp