snappy性能测试之安装运行
2024-08-25 01:51:43
项目地址:https://code.google.com/p/snappy/
下载后,解压。
$./configure
$make
建立一个简单的测试文件a.cpp:
#include "snappy.h"
#include <string>
#include <iostream>
int main() {
std::string s = "ddsandslkadnsldsan;lkdsanf;ladnskal;fsan;lkfsjk;lfsna;lfdskfsa";
std::string d;
snappy::Compress(s.data(), s.size(), &d);
std::cout<<d<<std::endl;
std::cout<<s.size()<<" "<<d.size()<<std::endl;
return 0;
}
编译运行:
libtool --mode=compile g++ -c a.cpp
libtool --mode=link g++ -o test a.lo libsnappy.la
./test
rm test
最新文章
- SharePoint 2013 Nintex Workflow 工作流帮助(十)
- linux下python启动第三方程序,并控制关闭
- c++ 从标注输入流读取行
- GNU scientific library
- 动态游标(例如表名作为参数)以及动态SQL分析
- 十条有用的GO技术
- 微信跳转ticket值怎么得到?浏览器跳到微信?哪里有微信跳转接口?跳转功能能用多久?
- Python——pandas数据处理(python programming)
- VUE 前端项目优化方法
- Java多线程——Lock&;Condition
- 反爬虫之JS反编译:PyExecJS
- 10个有趣的Javascript和CSS库
- mysql的数据恢复
- Boost application performance using asynchronous I/O-ref
- Django中间件执行顺序
- Python 去掉文本中空行
- 【我的Android进阶之旅】解决bug:You need to use a Theme.AppCompat theme (or descendant) with this activity.
- jquery autocomplete jqueryui报错
- EF4学习链接
- 微信Oauth2.0网页开放授权