Initial (manual) import
This commit is contained in:
1 parent
f39611c506
commit
895fe109de
661 files changed
+245862
No files matched your search
@@ -0,0 +1,35 @@
|
||||
/*You probably don't need this. It makes a directory
|
||||
tree into a flat contiguous memory chunk, suitable for
|
||||
serial communication and rebuilds it into a tree on the
|
||||
other end.
|
||||
*/
|
||||
|
||||
U0 SerializeTree()
|
||||
{
|
||||
CDirEntry *tmpde=FilesFind("/Demo/*.DD*",FUF_RECURSE);
|
||||
I64 size;
|
||||
U8 *ptr;
|
||||
CArcCompress *arc;
|
||||
|
||||
LineRep1(tmpde); //We have $LK,"CDirEntry",A="MN:CDirEntry"$.fullname
|
||||
LineRep2(DocPut,tmpde);
|
||||
"$$GREEN$$***************$$FG$$\n";
|
||||
ptr=DirTreeSerialize(tmpde,&size);
|
||||
DirTreeDel(tmpde);
|
||||
D(ptr,size);
|
||||
"$$GREEN$$***************:%7d$$FG$$\n",size;
|
||||
arc=CompressBuf(ptr,size);
|
||||
Free(ptr);
|
||||
D(arc,arc->compressed_size);
|
||||
"$$GREEN$$***************:%7d$$FG$$\n",size;
|
||||
ptr=ExpandBuf(arc);
|
||||
size=arc->expanded_size;
|
||||
Free(arc);
|
||||
D(ptr,size);
|
||||
"$$GREEN$$***************:%7d$$FG$$\n",size;
|
||||
tmpde=DirTreeUnserialize(ptr);
|
||||
LineRep2(DocPut,tmpde); //We don't have $LK,"CDirEntry",A="MN:CDirEntry"$.fullname
|
||||
DirTreeDel(tmpde);
|
||||
}
|
||||
|
||||
SerializeTree;
|
||||
Reference in new issue
Block a user