* rename decode to decodeExactUnsafe.
* add decodeExact, which checks for invalid chars and padding.
* add decodeWithIgnore, which also allows ignoring chars.
* alphabets are supplied to the decoders with their
char-to-index mapping already built, which enables it to be
done at comptime.
* all decode/encode apis except decodeWithIgnore require dest
to be the exactly correct length. This is calculated by a
calc function corresponding to each api. These apis no longer
return the dest parameter.
* for decodeWithIgnore, an exact size cannot be known a priori.
Instead, a calc function gives an upperbound, and a runtime
error is returned in case of overflow. decodeWithIgnore
returns the number of bytes written to dest.
closes#611
* fix fstat wrong on darwin
* move std.debug.global_allocator to std.debug.global_allocator_state and make it private
* add std.debug.global_allocator as a pointer (to upgrade your zig code remove
the '&')
I started working on #465 and made some corresponding std.io
API changes.
New structs:
* std.io.FileInStream
* std.io.FileOutStream
* std.io.BufferedOutStream
* std.io.BufferedInStream
Removed:
* std.io.File.in_stream
* std.io.File.out_stream
Now instead of &file.out_stream or &file.in_stream to get access to
the stream API for a file, you get it like this:
var file_in_stream = io.FileInStream.init(&file);
const in_stream = &file_in_stream.stream;
var file_out_stream = io.FileOutStream.init(&file);
const out_stream = &file_out_stream.stream;
This is evidence that we might not need any OOP features -
See #130.
see #383
there is a plan to unify most of the reflection into 2
builtin functions, as outlined in the above issue,
but this gives us needed features for now, and we can
iterate on the design in future commits