import { File } from "./searchee.js";
interface TorrentDirent {
    length: number;
    path?: Buffer[];
    "path.utf-8"?: Buffer[];
}
export interface Torrent {
    info: {
        "name.utf-8"?: Buffer;
        name?: Buffer;
        "piece length": number;
        pieces: Buffer;
        files?: TorrentDirent[];
        length?: number;
        private: number;
    };
    comment?: Buffer | string;
    announce?: Buffer;
    "announce-list"?: Buffer[][];
}
/**
 * "Fastresume" for all clients. Used to get torrent info.
 * qBittorrent: .fastresume, Transmission: .resume, rTorrent: .rtorrent
 * Deluge doesn't store labels in fastresume, but in label.conf
 */
interface TorrentMetadata {
    trackers?: Buffer[][];
    "qBt-category"?: Buffer;
    "qBt-tags"?: Buffer;
}
export declare function updateMetafileMetadata(metafile: Metafile, metadata: TorrentMetadata): void;
export declare function sanitizeTrackerUrl(url: string): string | null;
export declare class Metafile {
    infoHash: string;
    length: number;
    name: string;
    /**
     * Always name, exists for compatibility with Searchee
     */
    title: string;
    pieceLength: number;
    files: File[];
    isSingleFileTorrent: boolean;
    category?: string;
    tags?: string[];
    trackers: string[];
    raw: Torrent;
    constructor(raw: Torrent);
    static decode(buf: Buffer): Metafile;
    getFileSystemSafeName(): string;
    encode(): Buffer;
}
export {};
