module V1::Util

Extended Modules

Defined in:

v1/util/and_closer.cr
v1/util/once.cr
v1/util/sync.cr
v1/util/util.cr
v1/util/verify.cr
v1/util/zip.cr

Constant Summary

GZIP_MAGIC_HEADER = Bytes[31, 139]

Class Method Summary

Instance Method Summary

Class Method Detail

def self.read_all(r : IO) #

[View source]
def self.verify_read_closer(r : IO, h : V1::Hash) #

verify_read_closer wraps the given IO to verify that its contents match the provided V1::Hash before EOF is returned


[View source]

Instance Method Detail

def dump_request(req, body) #

[View source]
def dump_response(res, body) #

[View source]
def gunzip_reader_closer(r : IO) #

reads compressed input data from the IO and returns an IO from which uncompressed data may be read


[View source]
def gzip_reader_closer(r : IO, level) #

[View source]
def gzip_reader_closer(r : IO) #

[View source]
def is_gzipped(r : IO) #

detects whether the input stream is compressed


[View source]
def read_dir(dir : String) #

[View source]
def temp_dir(prefix : String, dir : String = Dir.tempdir) #

[View source]