create compressed buffer & file