lzma解压缩报错

lzma解压缩出错
#include <windows.h>

#include <fstream>
#include <iostream>
using namespace std;

#include "lzmalib.h"

#define input_file "e:/input.txt" //文件大小只有几十个字节,下面的缓冲区1024长度足够
#define compressed_file "e:/compressed.txt"
#define output_file "e:/output.txt"


unsigned char prop[5] = { 0 };
size_t propSize = 5;


bool compress() {
fstream fs(input_file);
fs.seekg(0, ios::end);
int len = fs.tellg();

char buff[1024];
fs.seekg(0);
fs.read(buff, len);
fs.close();


char temp[1024];
size_t temp_len = sizeof(temp);


int err = LzmaCompress((unsigned char*)temp, &temp_len, 
(const unsigned char*)buff, (size_t)strlen(buff),
prop, &propSize,
5, (1 << 24), 3, 0, 2, 32, 2); 


if(err != SZ_OK) {
cout << "error on compressing, err code: " << err << endl;
return false;
}
cout << "after compressed size: " << temp_len << endl;
ofstream ofs(compressed_file);
ofs.write(temp, temp_len);
ofs.close();
return true;
}
bool de_compress() {
fstream ifs(compressed_file);
ifs.seekg(0, ios::end);
size_t compressed_size = ifs.tellg();
char compressed[1024];

ifs.read(compressed, compressed_size);
ifs.close();

char output[1024];
size_t t_output = 1024;
int err = LzmaUncompress((unsigned char*)output, &t_output, 
 (const unsigned char*)compressed, &compressed_size,
 (const unsigned char*)prop, propSize);
if(err != SZ_OK) { // 这个地方返回 1 == SZ_ERROR_DATA
cout << "error on decompress, err code: " << err << endl;
return false;
}
cout << "data after decompress: (" << t_output << " bytes)" << endl;
return true;
}
int main() {
compress(); //把input.txt压缩生成compressed.txt
cout << "---------------------------" << endl;
de_compress();//从compressed.txt解压生成output.txt
}

为什么LzmaUncompress 会返回 SZ_ERROR_DATA ? 有人用过这个压缩库吗?
------解决方案--------------------
没用过