Skip to content

Commit

Permalink
resave_single_compressed_diff() return new out_diff curPos;
Browse files Browse the repository at this point in the history
  • Loading branch information
housisong committed Jan 9, 2024
1 parent e1e9bf1 commit e760adf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion libHDiffPatch/HDiff/diff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,8 @@ void resave_compressed_diff(const hpatch_TStreamInput* in_diff,
}


void resave_single_compressed_diff(const hpatch_TStreamInput* in_diff,
hpatch_StreamPos_t
resave_single_compressed_diff(const hpatch_TStreamInput* in_diff,
hpatch_TDecompress* decompressPlugin,
const hpatch_TStreamOutput* out_diff,
const hdiff_TCompress* compressPlugin,
Expand Down Expand Up @@ -1439,6 +1440,7 @@ void resave_single_compressed_diff(const hpatch_TStreamInput* in_diff,
TPlaceholder compressedSize_pos=outDiff.packUInt_pos(compressPlugin?diffInfo->uncompressedSize:0);
outDiff.pushStream(&clip,compressPlugin,compressedSize_pos);
}
return outDiff.getWritedPos();
}


Expand Down
4 changes: 3 additions & 1 deletion libHDiffPatch/HDiff/diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ bool check_single_compressed_diff(const hpatch_TStreamInput* newData,
//resave single_compressed_diff
// decompress in_diff and recompress to out_diff
// throw std::runtime_error when input file error or I/O error,etc.
void resave_single_compressed_diff(const hpatch_TStreamInput* in_diff,
// return new out_diff curPos
hpatch_StreamPos_t
resave_single_compressed_diff(const hpatch_TStreamInput* in_diff,
hpatch_TDecompress* decompressPlugin,
const hpatch_TStreamOutput* out_diff,
const hdiff_TCompress* compressPlugin,
Expand Down

0 comments on commit e760adf

Please sign in to comment.