probe:run (compose service prober, PROBE_CONNECTIONS, default 6) claims waiting candidates of settled releases (lone, then par2, then archive), fetches each article with BODY over connections of its own (no compression) and inspects it: the yEnc name and size, the content type from the first bytes, a par2 set's files, a RAR volume's entries and whether they're encrypted. Results per release and kind in release_inspections (CHUNK_TABLESPACE, the HDD); on the release passworded, inner_name (the largest content name) and inspected_at. 430 = missing, not yEnc = error, both final; connection trouble puts the candidate back. Fetch and parse in one process: an article takes ~0.1 s per connection, parsing a few ms (no queue in between). Parsers from voyager 1 (lib/yenc, lib/rar, lib/par2, lib/content sniff) with their tests; XoverClient.body; yencode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
611 B
TypeScript
16 lines
611 B
TypeScript
declare module 'yencode' {
|
|
export function decode(data: Buffer, stripDots?: boolean): Buffer
|
|
export function encode(data: Buffer, lineSize?: number, column?: number): Buffer
|
|
/** Returns the CRC32 as a 4-byte big-endian buffer. */
|
|
export function crc32(data: Buffer, initial?: Buffer): Buffer
|
|
/** CRC32 of A+B from crc(A), crc(B) and the length of B. */
|
|
export function crc32_combine(crc1: Buffer, crc2: Buffer, len2: number): Buffer
|
|
const yencode: {
|
|
decode: typeof decode
|
|
encode: typeof encode
|
|
crc32: typeof crc32
|
|
crc32_combine: typeof crc32_combine
|
|
}
|
|
export default yencode
|
|
}
|