Logo Search packages:      
Sourcecode: jigdo version File versions

MkTemplate Class Reference

#include <mktemplate.hh>

List of all members.


Detailed Description

Create location list (jigdo) and image template (template) from one big file and a list of files. The template file contains a compressed version of the big file, excluding the data of any of the other files that are contained somewhere in the big file. Instead of their data, the image template file just lists their checksums.

Definition at line 51 of file mktemplate.hh.


Public Member Functions

 MkTemplate (JigdoCache *jcache, bistream *imageStream, JigdoConfig *jigdoInfo, bostream *templateStream, ProgressReporter &pr=noReport, int zipQuality=9, size_t readAmnt=128U *1024, bool addImage=true, bool addServers=true)
bool run (const string &imageLeafName="image", const string &templLeafName="template")
void setMatchExec (const string &me)

Static Public Attributes

static ProgressReporter noReport
 Default reporter: Only prints error messages to stderr.

Private Types

typedef vector< vector
< FilePart * > > 
FileVec

Private Member Functions

INLINE bool checkMD5Match (byte *const buf, const size_t bufferLength, const size_t data, const size_t md5BlockLength, uint64 &nextEvent, const size_t stillBuffered, Desc &desc)
INLINE bool checkMD5Match_mismatch (const size_t stillBuffered, PartialMatch *x, Desc &desc)
INLINE void checkRsyncSumMatch (const RsyncSum64 &sum, const uint32 &bitMask, const size_t blockLen, const size_t back, const size_t md5BlockLength, uint64 &nextEvent)
void checkRsyncSumMatch2 (const size_t blockLen, const size_t back, const size_t md5BlockLength, uint64 &nextEvent, FilePart *file)
void debugRangeFailed ()
void debugRangeInfo (uint64 start, uint64 end, const char *msg, const PartialMatch *x=0)
void finalizeJigdo (const string &imageLeafName, const string &templLeafName, const MD5Sum &templMd5Sum)
INLINE bool matchExecCommands (PartialMatch *x)
MkTemplateoperator= (const MkTemplate &)
void prepareJigdo ()
void printRangeInfo (uint64 start, uint64 end, const char *msg, const PartialMatch *x=0)
bool rereadUnmatched (FilePart *file, uint64 count)
INLINE bool scanFiles (size_t blockLength, uint32 blockMask, size_t md5BlockLength)
INLINE bool scanImage (byte *buf, size_t bufferLength, size_t blockLength, uint32 blockMask, size_t md5BlockLength, MD5Sum &)
INLINE void scanImage_mainLoop_fastForward (uint64 nextEvent, RsyncSum64 *rsum, byte *buf, size_t *data, size_t *n, size_t *rsumBack, size_t bufferLength, size_t blockLength, uint32 blockMask, size_t md5BlockLength)
INLINE bool unmatchedAtEnd (byte *const buf, const size_t bufferLength, const size_t data, Desc &desc)

Static Private Member Functions

static INLINE void insertInTodo (PartialMatchQueue &matches, PartialMatch *x)

Private Attributes

bool addImageSection
bool addServersSection
FileVec block
JigdoCachecache
size_t fileCount
uint64 fileSizeTotal
bistream * image
JigdoConfig * jigdo
set< PartLine > jigdoParts
vector< FilePart * > matchedParts
PartialMatchQueuematches
string matchExec
uint64 off
uint64 oldAreaEnd
size_t readAmount
ProgressReporterreporter
unsigned sectorLength
bostream * templ
uint64 unmatchedStart
Zobstreamzip
int zipQual

Static Private Attributes

static Logger debug
static const byte IMAGE_INFO = 1
static const unsigned INITIAL_SECTOR_LENGTH = 512
static const byte MATCHED_FILE = 3
static const unsigned MAX_SECTOR_LENGTH = 65536
static const size_t REPORT_INTERVAL = 256U*1024
static const byte UNMATCHED_DATA = 2

Friends

class PartialMatchQueue

Classes

class  Desc
class  PartialMatch
class  PartialMatchQueue
struct  PartIndex
struct  PartLine
class  ProgressReporter

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index