:+1:, also this pattern is very common when using the Zlib library. I can't believe there's no helper function.