using TEAMModelOS.SDK.IP2Region;
namespace TEAMModelOS.SDK
{
internal class HeaderBlock
{
public long IndexStartIp
{
get;
private set;
}
public int IndexPtr
{
get;
private set;
}
public HeaderBlock(long indexStartIp, int indexPtr)
{
IndexStartIp = indexStartIp;
IndexPtr = indexPtr;
}
///
/// Get the bytes for total storage
///
///
/// Bytes gotten.
///
public byte[] GetBytes()
{
/*
* +------------+-----------+
* | 4bytes | 4bytes |
* +------------+-----------+
* start ip index ptr
*/
byte[] b = new byte[8];
Utils.WriteIntLong(b, 0, IndexStartIp);
Utils.WriteIntLong(b, 4, IndexPtr);
return b;
}
}
}