sgcWebSockets uses ZLib for WebSocket Compression/Decompression. Recently Zlib has released a new version with fixes the following issues:
- Z_FIXED 전략 사용 시 범위를 벗어난 접근이 발생할 수 있는 deflate 버그를 수정했어요.
- deflate_stored()에서 윈도우가 가득 찰 때 발생하는 deflate 버그를 수정했어요.
- CRC-32 계산 속도를 1.5~3배 향상시켰어요.
- ARMv8 프로세서에서 하드웨어 CRC-32 명령어를 사용해요.
- x의 거듭제곱 테이블로 crc32_combine()을 빠르게 했어요.
- 빠른 결합을 위해 crc32_combine_gen()과 crc32_combine_op()를 추가했어요.
ZLib Statically Linked
sgcWebSockets Enterprise Edition includes a custom Indy version which makes use of ZLib to statically link the .obj files, those files have been updated to the latest ZLib version, so you only need to download the latest sgcWebSockets version to apply this fix.
기본 옵션이므로 99%의 사용자는 sgcWebSockets 버전을 업데이트하기만 하면 충분해요(sgcWebSockets 2022.4+).
ZLib Dynamic Library
sgcWebSockets 2022.4.0부터 바이너리에서 .obj 파일을 정적으로 링크하는 대신 zlib 라이브러리를 동적으로 로드할 수 있어요.
To do this, add the following Conditional Define to your project:
SGC_DYNAMICLOAD_ZLIB
대안으로 소스 폴더에 있는 sgcIndy.inc 파일을 편집해 다음 줄을 추가할 수 있어요.
{$DEFINE SGC_DYNAMICLOAD_ZLIB}
마지막으로 ZLib 라이브러리 위치를 설정해야 해요. 다음 메서드를 사용해 라이브러리가 있는 전체 경로(라이브러리 이름 제외)를 전달하세요.
sgcIdZLibHeaders.IdZLibSetLibPath('c:\software\zlib');
*이 설정은 소스 코드가 있는 sgcWebSockets Enterprise Edition에서만 유효해요. 컴파일된 ZLib dll은 비공개 계정에서 다운로드할 수 있어요.
