A very intersting code
-
when i look into 7z's code, find this:
namespace NSignature
{
UInt32 kLocalFileHeader = 0x04034B50 + 1;
UInt32 kDataDescriptor = 0x08074B50 + 1;
UInt32 kCentralFileHeader = 0x02014B50 + 1;
UInt32 kEndOfCentralDir = 0x06054B50 + 1;
UInt32 kZip64EndOfCentralDir = 0x06064B50 + 1;
UInt32 kZip64EndOfCentralDirLocator = 0x07064B50 + 1;class CMarkersInitializer
{
public:
CMarkersInitializer()
{
kLocalFileHeader--;
kDataDescriptor--;
kCentralFileHeader--;
kEndOfCentralDir--;
kZip64EndOfCentralDir--;
kZip64EndOfCentralDirLocator--;
}
};
static CMarkersInitializer g_MarkerInitializer;
}i really wonder why they did this? do any body have read this code? Thanks
-
when i look into 7z's code, find this:
namespace NSignature
{
UInt32 kLocalFileHeader = 0x04034B50 + 1;
UInt32 kDataDescriptor = 0x08074B50 + 1;
UInt32 kCentralFileHeader = 0x02014B50 + 1;
UInt32 kEndOfCentralDir = 0x06054B50 + 1;
UInt32 kZip64EndOfCentralDir = 0x06064B50 + 1;
UInt32 kZip64EndOfCentralDirLocator = 0x07064B50 + 1;class CMarkersInitializer
{
public:
CMarkersInitializer()
{
kLocalFileHeader--;
kDataDescriptor--;
kCentralFileHeader--;
kEndOfCentralDir--;
kZip64EndOfCentralDir--;
kZip64EndOfCentralDirLocator--;
}
};
static CMarkersInitializer g_MarkerInitializer;
}i really wonder why they did this? do any body have read this code? Thanks
0x04034B50; 0x08074B50; 0x02014B50; 0x06054B50; 0x06064B50; 0x07064B50; those code are const, why add 1 and then sub 1?
-
0x04034B50; 0x08074B50; 0x02014B50; 0x06054B50; 0x06064B50; 0x07064B50; those code are const, why add 1 and then sub 1?