现在的位置: 首页 > 综合 > 正文

Is zlib thread-safe?

2011年09月17日 ⁄ 综合 ⁄ 共 441字 ⁄ 字号 评论关闭

Frequently Asked Questions about zlib

  •  

  • Is zlib thread-safe?

    Yes. However any library routines that zlib uses and any application- provided memory allocation routines must also be thread-safe. zlib's gz* functions use stdio library routines, and most of zlib's functions use the library memory allocation routines by default. zlib's *Init* functions allow for the application to provide custom memory allocation routines.

    Of course, you should only operate on any given zlib or gzip stream from a single thread at a time.

  • 抱歉!评论已关闭.