/* parc * Copyright (C) 2025 Ekaitz Zarraga * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef PIECE_TABLE_H #define PIECE_TABLE_H #include typedef struct _piece_table piece_table; piece_table *piece_table_create (void); piece_table * piece_table_create_from (char *orig, size_t size); void piece_table_destroy (piece_table * piece_table); char piece_table_index (piece_table *pt, size_t pos); void piece_table_insert (piece_table *pt, size_t pos, char *in, size_t len); void piece_table_delete (piece_table *pt, size_t pos, size_t len); void piece_table_to_string (piece_table *pt, char *buf, size_t size); size_t piece_table_length (piece_table *pt); #endif