Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
如果将 compression 选项设置为 zlib,则可以使用此选项指定上载的压缩窗口大小。
zlib_upload_window_size=window-bits
在 Mobile 操作系统上为 12,在桌面操作系统上为 15
要关闭上载压缩,可将窗口大小设置为 0。其它情况下,窗口大小可以是介于 9 和 15 之间的值(包括 9 和 15)。一般而言,使用较大的窗口大小可实现较高的压缩率,但也需要更多内存。
window-bits 是以 2 为底的窗口大小(历史缓冲区大小)的对数。以下公式可用于确定对于每个 window-bits 在客户端上要使用多少内存:
upload (compress): memory = 2(window-size + 3)
download (decompress): memory = 2(window-size)
如果将应用程序直接链接到静态 UltraLite 运行时,则需要调用 ULEnableZlibSyncCompression( sqlca ) 将 zlib 功能直接链接到应用程序。否则,必须部署 mlczlib12.dll。
ULEnableZlibSyncCompression( sqlca )
有关如何设置 dbmlsync 网络协议选项的信息,请参见CommunicationAddress (adr) 扩展选项。
有关如何设置 UltraLite 网络协议选项的信息,请参见UltraLite 同步流的网络协议选项。
以下选项只为下载设置压缩:
"compression=zlib;zlib_upload_window_size=0"