// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_ENCODING_ZIPLIST = 5; /*
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_HASH = 4;
// 
// Path: Redis-Synyed-util/src/main/java/com/wmz7year/synyed/util/NumberUtil.java
// public static int byte2Int(byte[] buffer) {
// 	if (buffer == null) {
// 		throw new NullPointerException();
// 	}
// 	if (buffer.length != 4) {
// 		throw new IllegalArgumentException(
// 				"Error buffer length can not cover bytes to int:" + Arrays.toString(buffer));
// 	}
// 	return (((buffer[3]) << 24) | ((buffer[2] & 0xff) << 16) | ((buffer[1] & 0xff) << 8) | ((buffer[0] & 0xff)));
// }
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/exception/RedisRDBException.java
// public class RedisRDBException extends Exception {
// 	private static final long serialVersionUID = -8089839086790389424L;
// 	private Throwable nestedThrowable = null;
// 
// 	public RedisRDBException() {
// 		super();
// 	}
// 
// 	public RedisRDBException(String msg) {
// 		super(msg);
// 	}
// 
// 	public RedisRDBException(Throwable nestedThrowable) {
// 		super(nestedThrowable);
// 		this.nestedThrowable = nestedThrowable;
// 	}
// 
// 	public RedisRDBException(String msg, Throwable nestedThrowable) {
// 		super(msg, nestedThrowable);
// 		this.nestedThrowable = nestedThrowable;
// 	}
// 
// 	/*
// 	 * @see java.lang.Throwable#printStackTrace()
// 	 */
// 	@Override
// 	public void printStackTrace() {
// 		super.printStackTrace();
// 		if (nestedThrowable != null) {
// 			nestedThrowable.printStackTrace();
// 		}
// 	}
// 
// 	/*
// 	 * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
// 	 */
// 	@Override
// 	public void printStackTrace(PrintStream ps) {
// 		super.printStackTrace(ps);
// 		if (nestedThrowable != null) {
// 			nestedThrowable.printStackTrace(ps);
// 		}
// 	}
// 
// 	/*
// 	 * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
// 	 */
// 	@Override
// 	public void printStackTrace(PrintWriter pw) {
// 		super.printStackTrace(pw);
// 		if (nestedThrowable != null) {
// 			nestedThrowable.printStackTrace(pw);
// 		}
// 	}
// }


import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ENCODING_ZIPLIST;
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_HASH;
import static com.wmz7year.synyed.util.NumberUtil.byte2Int;
import java.io.ByteArrayInputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import com.wmz7year.synyed.exception.RedisRDBException;
		return new String(buffer);
	}

	/**
	 * 读取元素数量的方法
	 * 
	 * @return 包含的元素数量
	 * @throws RedisRDBException
	 *             当解析发生问题时抛出该异常
	 */
	private int readEntryLength() throws RedisRDBException {
		return readLength();
	}

	/**
	 * 读取长度的方法<br>
	 * 先读取1个字节 如果该字节内容为0xFD 则接着向后读取4个字节转换为int作为长度
	 * 
	 * @return 读取到的长度
	 * @throws RedisRDBException
	 *             当读取发生错误时抛出该异常
	 */
	private int readLength() throws RedisRDBException {
		byte b = readByte();
		if (b == 0xFD) {
			// 接着读取4个字节转换为int
			byte[] buffer = new byte[4];
			if (!readBytes(buffer, 0, 4)) {
				throw new RedisRDBException("解析错误");
			}
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_ENCODING_ZIPLIST = 5; /*
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/constant/RedisRDBConstant.java
// public static final byte REDIS_HASH = 4;
// 
// Path: Redis-Synyed-util/src/main/java/com/wmz7year/synyed/util/NumberUtil.java
// public static int byte2Int(byte[] buffer) {
// 	if (buffer == null) {
// 		throw new NullPointerException();
// 	}
// 	if (buffer.length != 4) {
// 		throw new IllegalArgumentException(
// 				"Error buffer length can not cover bytes to int:" + Arrays.toString(buffer));
// 	}
// 	return (((buffer[3]) << 24) | ((buffer[2] & 0xff) << 16) | ((buffer[1] & 0xff) << 8) | ((buffer[0] & 0xff)));
// }
// 
// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/exception/RedisRDBException.java
// public class RedisRDBException extends Exception {
// 	private static final long serialVersionUID = -8089839086790389424L;
// 	private Throwable nestedThrowable = null;
// 
// 	public RedisRDBException() {
// 		super();
// 	}
// 
// 	public RedisRDBException(String msg) {
// 		super(msg);
// 	}
// 
// 	public RedisRDBException(Throwable nestedThrowable) {
// 		super(nestedThrowable);
// 		this.nestedThrowable = nestedThrowable;
// 	}
// 
// 	public RedisRDBException(String msg, Throwable nestedThrowable) {
// 		super(msg, nestedThrowable);
// 		this.nestedThrowable = nestedThrowable;
// 	}
// 
// 	/*
// 	 * @see java.lang.Throwable#printStackTrace()
// 	 */
// 	@Override
// 	public void printStackTrace() {
// 		super.printStackTrace();
// 		if (nestedThrowable != null) {
// 			nestedThrowable.printStackTrace();
// 		}
// 	}
// 
// 	/*
// 	 * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
// 	 */
// 	@Override
// 	public void printStackTrace(PrintStream ps) {
// 		super.printStackTrace(ps);
// 		if (nestedThrowable != null) {
// 			nestedThrowable.printStackTrace(ps);
// 		}
// 	}
// 
// 	/*
// 	 * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
// 	 */
// 	@Override
// 	public void printStackTrace(PrintWriter pw) {
// 		super.printStackTrace(pw);
// 		if (nestedThrowable != null) {
// 			nestedThrowable.printStackTrace(pw);
// 		}
// 	}
// }


// Path: Redis-Synyed-common/src/main/java/com/wmz7year/synyed/parser/entry/RedisHashZipMap.java
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_ENCODING_ZIPLIST;
import static com.wmz7year.synyed.constant.RedisRDBConstant.REDIS_HASH;
import static com.wmz7year.synyed.util.NumberUtil.byte2Int;
import java.io.ByteArrayInputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import com.wmz7year.synyed.exception.RedisRDBException;

		return new String(buffer);
	}

	/**
	 * 读取元素数量的方法
	 * 
	 * @return 包含的元素数量
	 * @throws RedisRDBException
	 *             当解析发生问题时抛出该异常
	 */
	private int readEntryLength() throws RedisRDBException {
		return readLength();
	}

	/**
	 * 读取长度的方法<br>
	 * 先读取1个字节 如果该字节内容为0xFD 则接着向后读取4个字节转换为int作为长度
	 * 
	 * @return 读取到的长度
	 * @throws RedisRDBException
	 *             当读取发生错误时抛出该异常
	 */
	private int readLength() throws RedisRDBException {
		byte b = readByte();
		if (b == 0xFD) {
			// 接着读取4个字节转换为int
			byte[] buffer = new byte[4];
			if (!readBytes(buffer, 0, 4)) {
				throw new RedisRDBException("解析错误");
			}
			return byte2Int(buffer);