Skip to content

zweite/phone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phone.dat文件格式


        | 4 bytes |                     <- phone.dat 版本号
        ------------
        | 4 bytes |                     <-  第一个索引的偏移
        -----------------------
        |  offset - 8            |      <-  记录区
        -----------------------
        |  index                 |      <-  索引区
        -----------------------

  • 头部 头部为8个字节,版本号为4个字节,第一个索引的偏移为4个字节(<4si)。
  • 记录区 中每条记录的格式为"<省份>|<城市>|<邮编>|<长途区号>\0"。 每条记录以'\0'结束。
  • 索引区 中每条记录的格式为"<手机号前七位><记录区的偏移><卡类型>",每个索引的长度为9个字节(<iiB)。

测试结果

机器配置: 2.7 GHz Intel Core i5 8 GB 1867 MHz DDR3

测试结果 测试1000000次,平均时间0.00128 ms

About

国内电话号码解析 https://github.com/lovedboy/phone 数据库的java实现

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages