Skip to content

Different number of updates than with BGPKit-rust #4

@Aperence

Description

@Aperence

Hello,

I'm currently encountering a really weird issue. When trying to use this python library to parse a MRT file, I obtain different numbers of parsed Elem when using this library, or the original rust library.

Example on http://archive.routeviews.org/route-views4/bgpdata/2026.01/UPDATES/updates.20260101.1645.bz2:

use bgpkit_parser::BgpkitParser;

fn main(){
    let parser = BgpkitParser::new("http://archive.routeviews.org/route-views4/bgpdata/2026.01/UPDATES/updates.20260101.1645.bz2").unwrap();
    
    let mut count = 0;
    for elem in parser.into_iter(){
        count += 1
    }
    
    println!("{}", count);
    // Prints 484201
}
from pybgpkit_parser import Parser
parser = Parser("http://archive.routeviews.org/route-views4/bgpdata/2026.01/UPDATES/updates.20260101.1645.bz2")

count = 0
for elem in parser:
    count += 1

print(count)
# Prints 435264

However, it seems to me that those libraries should (in theory) be equivalent. Do you have any idea about the reason of those differences ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions