使用sphinx-2.1.8-release将压缩响应发送到客户端时发出问题

时间:2014-10-08 05:02:44

标签: sphinx

我的要求是压缩我们从搜索数据中得到的所有数据  sphinx ....数据压缩后,需要将这些压缩数据发送到客户端  为了解压缩显示它......

*能够压缩数据并通过套接字将响应发送到客户端

在searchd.cpp中,

在Flush()中,将响应发送给客户端,

Uncompressed Data::

       * pBuffer is the (char *) which holds the uncompressed data information and iLen is the total length of the uncompressed data

       * Assume the iLen value is 434799

             std::cout.write(pBuffer,iLen);
             int iRes = sphSockSend ( m_iSock, pBuffer, iLen );

       Once the data has been sent to the client side,

                Tried printing the Length and length of dataread

                     Length :434799
                     read :434799


Compressed Data::

      * pBuffer is the char * which holds the compressed data information and iLen is the total length of the compressed data

      *Assume the iLen value is 138930

           std::cout.write(pBuffer,iLen);
           int iRes = sphSockSend ( m_iSock, pBuffer, iLen );

      Once the data has been sent to the client side

          Tried printing the Length and length of dataread

                            Length : 2027613373(getting huge amount of values)

                            read : 138922(this is fine)


         Can someone tell me how to solve this issue and provide me the info about where the length has been assigned in Sphinxclientapi.php?

0 个答案:

没有答案