mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-12-16 10:02:34 +08:00
feat: support for new architecture
This commit is contained in:
@@ -24,7 +24,7 @@ int hpatch_getInfo_by_mem(hpatch_singleCompressedDiffInfo* out_patinfo,
|
||||
mem_as_hStreamInput(&patStream,pat,pat+patsize);
|
||||
if (!getSingleCompressedDiffInfo(out_patinfo,&patStream,0))
|
||||
return kHPatch_error_info;//data error;
|
||||
return kHPatch_ok; //ok
|
||||
return kHPatch_ok; //ok
|
||||
}
|
||||
|
||||
static hpatch_TDecompress* getDecompressPlugin(const char* compressType){
|
||||
@@ -68,7 +68,7 @@ static int hpatch_by_stream(const hpatch_TStreamInput* old,hpatch_BOOL isLoadOld
|
||||
_check(decompressPlugin,kHPatch_error_compressType);
|
||||
}
|
||||
}
|
||||
{// mem
|
||||
{// mem
|
||||
size_t mem_size;
|
||||
size_t oldSize=(size_t)old->streamSize;
|
||||
isLoadOldAllToMem=isLoadOldAllToMem&&(old->streamSize<=kMaxLoadMemOldSize);
|
||||
@@ -76,7 +76,7 @@ static int hpatch_by_stream(const hpatch_TStreamInput* old,hpatch_BOOL isLoadOld
|
||||
mem_size=temp_cache_size+(isLoadOldAllToMem?oldSize:0);
|
||||
temp_cache=malloc(mem_size);
|
||||
_check(temp_cache,kHPatch_error_malloc);
|
||||
if (isLoadOldAllToMem){//load old to mem
|
||||
if (isLoadOldAllToMem){//load old to mem
|
||||
uint8_t* oldMem=temp_cache+temp_cache_size;
|
||||
_check(old->read(old,0,oldMem,oldMem+oldSize),kHPatch_error_old_fread);
|
||||
mem_as_hStreamInput(&_old,oldMem,oldMem+oldSize);
|
||||
@@ -95,7 +95,7 @@ _clear:
|
||||
}
|
||||
|
||||
int hpatch_by_mem(const uint8_t* old,size_t oldsize,uint8_t* newBuf,size_t newsize,
|
||||
const uint8_t* pat,size_t patsize,const hpatch_singleCompressedDiffInfo* patInfo){
|
||||
const uint8_t* pat,size_t patsize,const hpatch_singleCompressedDiffInfo* patInfo){
|
||||
hpatch_TStreamInput oldStream;
|
||||
hpatch_TStreamInput patStream;
|
||||
hpatch_TStreamOutput newStream;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// hpatch.h
|
||||
// import HDiffPatch, support patchData created by "hdiffz -SD -c-lzma2 oldfile newfile patchfile"
|
||||
// hpatch.h
|
||||
// import HDiffPatch, support patchData created by "hdiffz -SD -c-lzma2 oldfile newfile patchfile"
|
||||
// Copyright 2021 housisong, All rights reserved
|
||||
|
||||
#ifndef HDIFFPATCH_PATCH_H
|
||||
@@ -41,4 +41,4 @@ int hpatch_by_file(const char* oldfile, const char* newfile, const char* patchfi
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif //HDIFFPATCH_PATCH_H
|
||||
#endif //HDIFFPATCH_PATCH_H
|
||||
|
||||
Reference in New Issue
Block a user