Delphi 2009 中的 Zlib
我正在将一个应用程序升级到Delphi 2009。该应用程序使用Soap,我们使用Zlib 压缩soap 请求和响应流。 这在 Delphi 2006 中工作正常,但在 Delphi 2009 中不行。
所以我回到 Delphi 2006 并更改为使用 FastZlib。 它在 Delphi2006 中一切正常,但在 Delphi 2009 中不起作用,并且出现解压缩错误。
有没有其他人有这个问题?
我该如何解决这个问题?
桑迪普
I am upgrading a app to Delphi 2009. The app uses Soap and we compress the soap request and response streams using Zlib. This works fine in Delphi 2006 but not in Delphi 2009.
So I went back to Delphi 2006 and changed to use FastZlib. It all worked fine in Delphi2006 but does not work in Delphi 2009 and I get Decompress errors.
Has anyone else had this problem?
How do I go about fixing this?
Sandeep
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在D2009中你可以使用Zcompress/ZDecompress代替CompressBuf/DecompressBuf
我测试了一下,没有问题。
in D2009 you can use ZCompress/ZDecompress instead of CompressBuf/DecompressBuf
I test it and there is no problem.
我刚刚查看了内置的 Zlib.pas,它似乎已正确更新为 D2009。 是什么给你带来了问题?
I just looked through the built-in Zlib.pas and it appears to have been updated for D2009 properly. What's giving you problems?
在delphi 2006中,我有以下使用Zlib(来自Delphi 2006)压缩和解压缩的方法,
我应该更改什么才能使这些方法在Delphi 2009中工作?
In delphi 2006 I had following methods to compress and decompress using Zlib(from Delphi 2006)
What should I change for these to work in Delphi 2009?
可能值得尝试的事情 - 压缩数据,然后对其进行 UUENCODE,并在另一端反转该过程。 这将检测某些代码是否未正确处理嵌入的零。
抱歉,这只是帮助您缩小问题范围的部分解决方案。
Something that might be worth trying - compress your data, and then UUENCODE it, and on the other end, reverse the process. This will detect if some code is not dealing with embedded zero's properly.
Sorry, this is only a partial solution to help you narrow the problem down.
原来的海报很清楚这个问题: CompressBuf 和 DecompressBuf 已经消失了。
我还有一个项目,在 D7 中编译得很好,但在 D2010 中编译失败,因为它找不到“CompressBuf”或“DecompressBuf”。
使用 D7 非常愉快的 find 命令进行搜索,将例程定位在
c:\Program Files\Borland\Delphi7\Source\Rtl\Common\ZLib.pas
但是使用 D2010 的(笨拙的单独)“在文件中查找”命令进行搜索无法在任何地方找到 CompressBuf 或 DecompressBuf。
令人非常不安的是,升级 IDE 会导致项目中使用和需要的例程消失!
The original poster's was clear about the problem: CompressBuf and DecompressBuf are GONE.
I also have a project that compiles just fine in D7, but fails to compile in D2010 because it can't find "CompressBuf" or "DecompressBuf".
A search using D7's very pleasant find command locates the routines at
c:\Program Files\Borland\Delphi7\Source\Rtl\Common\ZLib.pas
But searching with D2010's (awkward separate) "Find in Files" command fails to locate CompressBuf or DecompressBuf anywhere.
It's very disturbing that upgrading the IDE causes routines used and needed in projects to disappear!