Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
console.clear();
const test_string = 'The Project Gutenberg EBook of The Adventures of Sherlock Holmesby Sir Arthur Conan Doyle(#15 in our series by Sir Arthur Conan Doyle)Copyright laws are changing all over the world Be sure to check thecopyright laws for your country before downloading or redistributingthis or any other Project Gutenberg eBookThis header should be the first thing seen when viewing this ProjectGutenberg file Please do not remove it Do not change or edit theheader without written permissionPlease read the "legal small print," and other information about theeBook and Project Gutenberg at the bottom of this file Included isimportant information about your specific rights and restrictions inhow the file may be used You can also find out about how to make adonation to Project Gutenberg, and how to get involved**Welcome To The World of Free Plain Vanilla Electronic Texts****eBooks Readable By Both Humans and By Computers, Since 1971*******These eBooks Were Prepared By Thousands of Volunteers!
//
var fs = require('fs');
var matches = {};
var input = fs.readFileSync('/Users/braydonbatungbacal/Desktop/big.txt').toString();
var validIndexes = [];
var length = 2; // the start length
for (var i = 0; i < input.length; i++) {
const fs = require('fs');
const os = require('os');
const path = require('path');
const BloomFilter = require('bloomfilter').BloomFilter;
const BitsyDictionary = require('../libs/dictionary');
module.exports = function(commander) {
commander
.command('dictionary <directoryPath> <outputFilePath>')
.description('Generate a bitsy dictionary from files within a directory.')
const fs = require('fs');
//const CircularJSON = require('circular-json');
var Heap = require('heap');
module.exports = BitsyDictionary;
function BitsyDictionary() {
this._dictionary = { // trie of symbols, with root to a given node representing a possible symbol.
symbolPointers: [],
huffmanTree: {} // Huffman tree for generating the binary code.
@iamarkdev
iamarkdev / minecraft-mca-parser.js
Created September 16, 2021 06:55
A node.js implementation to parse minecraft .mca region files and count total blocks, structures and biomes.
const fs = require('fs')
const path = require('path');
const { AnvilParser, NBTParser } = require('mc-anvil');
const minecraftIds = require('./minecraft-ids.js');
// iterate biomes for biomes
// determine mountains / caverns / ocean floor from heightmaps
// iterate sections for block info
function getWorldAttributes(worldRegionDirectoryPath) {