Read and buf packet size