I’m stuck on Stage #OW9
The expected output length is 820892 while the sample.torrent file has length equal to 92063 as described in the stage explanation, so it keeps failing on tests…
Here are my logs:
And here’s a snippet of my code:
else if ("info".equals(command)){
byte[] torrentBytes = Files.readAllBytes(Path.of("sample.torrent"));
Map<String, Object> meta = bencode.decode(torrentBytes, Type.DICTIONARY);
Map<String, Object> info = (Map<String, Object>) meta.get("info");
System.out.println("Tracker URL: " + meta.get("announce"));
System.out.println("Length: " + info.get("length"));
}

