This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pure Julia implementation of decompression of zlib and gzip | |
# compressed data, as specified by RFC 1950-1952. | |
module Inflate | |
export decompress, gunzip | |
# Huffman codes are internally represented by Vector{Vector{Int}}, | |
# where code[k] are a vector of the values with code words of length | |
# k. Codes are assigned in order from shorter to longer codes and in | |
# the order listed. E.g. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("extras/distributions.jl") | |
require("slicesampler.jl") | |
import Distributions.* | |
macro buildslicesampler(model) | |
# pull apart the model into variables and distributions | |
variables = Dict{Symbol,Expr}() | |
unboundvars = Set{Symbol}() | |
for line in model.args |