<commit_before>/* -*- Mode:c++; eval:(c-set-style "BSD"); c-basic-offset:4; indent-tabs-mode:nil; tab-width:8 -*- */

#ifndef __BACKUP_BAKFILE_H__
#define __BACKUP_BAKFILE_H__

#include "Btree.h"
#include "options.h"

class bakDatum;

class bakFile {
    static const int CACHE_SIZE = 200 * 1024 * 1024;
    static const int BTREE_ORDER = 25;
    Btree * bt;
    FileBlockInterface * fbi;
    const bkOptions &opts;
    bool calc_file_hash(std::string &hash, const std::string &path);
    // returns the hash
    bool put_file(std::string &hash, const std::string &path,
                  const uint64_t filesize);
    void delete_version(int version);
    void extract_file(uint32_t version, const std::string &path, int tarfd);
    void _extract(int tarfd);
    void _update(void);
    void create(void);
    void update(void);
    void listdb(void);
    void deletevers(void);
    void extract(void);
    void export_tar(void);
public:
    bakFile(const bkOptions &_opts);
    ~bakFile(void);
    void operate(void);
};

#endif /*__BACKUP_BAKFILE_H__*/
<commit_msg>increase pfkbak ram cache cuz why not<commit_after>/* -*- Mode:c++; eval:(c-set-style "BSD"); c-basic-offset:4; indent-tabs-mode:nil; tab-width:8 -*- */

#ifndef __BACKUP_BAKFILE_H__
#define __BACKUP_BAKFILE_H__

#include "Btree.h"
#include "options.h"

class bakDatum;

class bakFile {
    static const int CACHE_SIZE = 1000 * 1024 * 1024;
    static const int BTREE_ORDER = 25;
    Btree * bt;
    FileBlockInterface * fbi;
    const bkOptions &opts;
    bool calc_file_hash(std::string &hash, const std::string &path);
    // returns the hash
    bool put_file(std::string &hash, const std::string &path,
                  const uint64_t filesize);
    void delete_version(int version);
    void extract_file(uint32_t version, const std::string &path, int tarfd);
    void _extract(int tarfd);
    void _update(void);
    void create(void);
    void update(void);
    void listdb(void);
    void deletevers(void);
    void extract(void);
    void export_tar(void);
public:
    bakFile(const bkOptions &_opts);
    ~bakFile(void);
    void operate(void);
};

#endif /*__BACKUP_BAKFILE_H__*/

{'fraction_non_alphanumeric': 0.12586765386395188, 'fraction_numerical': 0.018047200370198982, 'mean_word_length': 3.609808102345416, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5126786', 'n_tokens_mistral': 786, 'n_tokens_neox': 743, 'n_words': 192}