►
From YouTube: .NET Design Review: AsnReader Part 2
Description
No description was provided for this meeting.
If this is YOUR meeting, an easy way to fix this is to add a description to your video, wherever mtngs.io found it (probably YouTube).
A
A
B
A
Okay
cool,
so
one
of
the
things
we
are
not
going
to
talk
about,
unless
we
somehow
finish
is
the
name
space
problem.
We
have.
We've
now
started
a
discussion
on
that
one
and
we'll
get
back
to
it
later.
Instead,
we're
just
going
to
go
over
the
shape
of
the
classes
and
assume
that
the
name
space
will
fit.
A
A
One
of
the
things
that
I've
tried
to
make
sure
in
the
writer
is
it
never
blocks
anyone
from
doing
anything
legitimate,
even
if
the
writer
itself
can't
represent
the
value,
and
so
this
is
the
catch-all
method.
So
writing
coded
value.
You
give
it
a
set
of
bytes.
As
long
as
the
outer
payload
looks
like
it
is
one
ASN
encoded
piece
of
data,
then
it
will
just
copy
all
of
the
data
directly
into
the
stream.
C
A
C
A
Okay,
I
assume
writing
coded
value,
has
no
objection.
Oh
I
guess
this
is
the
first
place
where
we're
seeing
cryptographic
exception
pop
up,
so
I
think
this
one
will
sort
of
come
with
the
namespace
I.
Have
it
as
an
open
question
at
the
end
of
what
like,
as
as
soon
as
we
move
it
out
of
system
security,
cryptography
cryptographic
exception
doesn't
make
any
sense.
The
only
reason
it
is
that
is
the
existing
certificate
code
used
Windows
crypto
API.
If
they
failed,
we
threw
a
cryptographic
exception.
A
A
B
B
B
Now
I
write,
encoded
values,
I
think
fine,
especially
because
the
documentation
will
clarify,
but
I
would
just
prefer
the
parameter
name
to
either
be
the
same
or
just
dropping
coded
from
the
parameter
name
just
for
terseness,
so
just
value.
You
know
because
the
method
name
already
says
it's
encoded,
so
it.
Why
does
the
parameter
name
need
to
repeat
it?.
A
Okay,
so
now
we're
gonna
go
through
so
I
have
to
set
up
as
data
type
by
data
type,
where
data
type
is
in
the
mostly
in
the
asn.1
sense,
and
so
everything
there's
always
two
overloads
well,
the
general
over-over
load
rule
is
extra
parameters
go
at
the
end.
In
this
case,
my
opinion
is
when
the
tag
when
you've
specified
an
explicit
override
tag
that
is
different
enough,
that
it
should
be
important
in
a
code
review
and
effectively.
I'm
saying
the
tag
and
value
overview
such
that
one
of
these.
A
A
There
are
times
that
you
need
to
say:
I
have
an
application-specific
tat
like
this
is
application
3,
meaning
only
the
application
knows
what
it
actually
means,
and
so
you
want
the
value
to
be
encoded.
The
way
that
a
boolean
would
be,
but
you've
changed
the
identifier
to
say
something:
custom,
that's
sort
of
unusual
and
I
mean
it
happens
all
the
time,
but
like
it's,
not
the
the
default
stance
and-
and
so
it's
when
looking
at
it,
encode
review
it's
like.
A
A
C
There
seems
like,
even
just
looking
at
the
description
of
the
method
right,
a
boolean
value
with
a
specified
tag.
That's
like
that
almost
seems
to
dictate
the
order.
It
feels
like
the
tag
is
the
optional
thing
and
therefore
it
should
be
secondary.
I
mean,
maybe
maybe
we
can
come
back
to
this
when
you
say
out
there
over
other
data
types
are
going
to
make
it
clear
why
the
order
matters.
A
C
A
A
A
A
A
A
B
Don't
necessarily
mind
the
so
I
don't
mind
them
all
having
the
same
parameter
name
but
again,
if
the
method
name
already
includes
object,
identifier
or
hopefully
just
shortened
to
oh
it
in
the
method
name,
don't
we
normally
just
use
value
as
a
parameter,
because
I
mean
this
is
basically
a
TLV
data
format.
Yeah.
A
C
A
A
C
A
C
A
This
one
has
actually
been
slightly
contentious
amongst
the
people
using
it
in
the
preview
is
so
what
I
have
so.
The
current
definition
that
I
have
for
right
integer
is,
you
can
give
it
essentially
the
the
bytes
to
directly
write
into
the
payload
and
the
rules
of
a
SN
encoding.
Are
you
have
to
use
the
fewest
number
of
bytes
possible
for
the
integer
value
you
want
to
specify
so
negative
1
is
just
FF.
A
The
rules
end
up.
The
way
that
that
gets
expressed
is
in
the
zero
byte
of
the
span.
If
all
of
the
bits
are
equal,
so
it's
FF
or
0,
and
the
high
bit
of
span
sub
1
matches
what
the
first
bit
said.
Then
you
have
at
least
one
wasted
byte,
because
you
could
eliminate
the
the
lead
byte
and
so
that's
an
encoding
error,
and
then
the
question
becomes:
should
this
normalize?
Should
this
validate
and
what
I
wrote
was
validate,
but
some
people
seem
to
want
normalize
is.
A
A
Writing
a
I'm
copying
one
structure
to
another,
then
you
would
do
write
integer
of
read,
integer
bytes,
and
so
that's
that's
what
the
method
was
designed
for,
but
in
in
cases
like
RSA
parameter
structures
and
other
big
number
byte
array
things
there
have
been.
Why
can't
this
just
fix
it
for
me,
and
if
we
do
that,
then
it
would
need
a
hey
I'm.
The
same.
A
B
Don't
really
have
a
strong
opinion.
Honestly
one-one
could
maybe
make
the
argument
that
normalizing
is
better
from
the
perspective
of
if
you
called
the
binary
primitives
api's,
and
it
gives
you
back
something.
That's
exactly
64
bits,
for
instance,
that
you
would
shrink
it
to
the
appropriate
size
before
writing
up.
But
that's
a
bit
of
a
stretch.
I
have.
B
A
A
B
D
A
A
You
give
a
a
series
of
bytes,
so
let's
call
it
we
don't
we
span
of
bytes
and
they
simply
get
written
down,
but
because
it's
trying
to
convey
something
that
may
not
be
in
a
full
number
of
bytes
the
bit
string.
Encoding
has
an
extra
byte
that
says
how
many
bits
in
the
last
byte
are
only
there
because
computers
like
multiples
of
eight
bits.
A
So
now,
when
we
come
back
again
to
normalize
versus
validate
of
the
three
encoding
rules
that
the
writer
supports,
BER
says
you're
odd
to
do
whatever
you
want
with
unused
bits.
Surinder
say
they
must
be
zero
and
taking
the
the
stance
that
the
writer
doesn't
do
any
data
normalization
right
now.
That
means,
if
you
report
an
unused
bit
and
it's
set
to
1,
then
this
will
throw
an
argument
exception.
Actually
it
says
it'll
be
a
cryptographic
exception,
but
I'll
change
you
to
an
argument
exception.
B
A
B
A
A
B
A
A
Okay
and
then
then
I
have
a
complicated
thing.
So
one
of
the
things
that
I
found
when
using
it
is
that
a
structure
says
that
I
need
to
write.
Something
is
a
bit
string,
but
I
have
it
as
unconnected
pieces
of
data,
and
so
I
took
the
string,
dot,
create
callback
method
and
and
applied
it
so
that
I
didn't
need
to
do
temporary
buffers.
B
C
B
A
C
B
A
B
Okay,
so
if
you,
if
you
needed
to
write
something
that,
for
whatever
reason
someone
needed
to
understand,
even
though
it's
not
a
normalized
form
of
an
integer,
there
are
ways
to
do
that.
Basically,
I'm.
Imagine
that
you're.
Imagine
that
your
interoperating
with
an
implementation
that
needs
to
read
an
integer
as
a
fixed
length.
For
instance,
I
mean
that
is
there
a
better
way
to
do
that
I
mean.
A
A
But
glancing
at
the
chat,
assuming
that
you're
relaying
Philips
question
I,
think
his
is
more
what
I
brought
up
of
if
you're
doing,
RSA
parameters.
That
is
a
big-endian
unsigned
integer,
which
means
you
need
to
know
that
you
need
to
insert
a
padding
byte
if
the
high
bit
is
set
on
byte
0,
which
is
where
I
started,
having
cracks
open
in
the
in
the
always
validate,
never
normalized
damage.
Yes,.
A
B
But
once
you
go
through
big
integer
is
the
intermediary
I.
Think
debugging
probably
becomes
a
lot
easier
because
you
can
actually
like
look
at
it
in
a
debugger
and
big
integer
will
say.
This
is
what
I
interpreted
the
value
to
be,
for
instance,
but
I,
don't
know
I'm
just
yeah
I'm
running
with
this
question.
Basically
yeah.
A
Yeah,
like
I'm
on
the
fence,
now
I,
don't
know
if
we
have
a
general
pattern
of
going
one
way
or
the
other
I
know
that
in
general
I
don't
like
coercive
API,
because
it
leads
to
a
lot
of
subtle
bugs
that
we
have
to
maintain
for
forever.
But
this
one
may
not
be
subtle
like
if
it's
simply
the
same
algorithm
have
run
it
through
a
big
integer.
Without
all
the
temporary
arrays
then
like,
we
could
certainly
do
it.
A
A
A
Two
collection,
types
and
two
structure,
definition,
types,
so
sequence
of
and
set
of,
are
both
collection
types
sequence
of
is
an
ordered
list
and
set
of
is
an
unordered
list.
Asterisk
sequence
effectively
is
the
same
as
defining
a
data
type,
because
it's
telling
you
you
will
see
these
fields
in
this
order
and
they
have
this
semantics,
meaning
as
opposed
to
it's
a
collection
and
there's
technically
a
fourth
thing
called
set,
which
is
you
will
see
these
fields
that
have
this
meaning
they
don't
have
to
be
written
down
in
a
prescribed
order.
A
So
technically,
you
can
I
think
called
push
sequence
with
context,
zero
as
a
tag
and
then
called
pop
set
with
a
contact,
zero
tag
which
then
I'll
just
skip
set
normalization.
No
it'll
do
septum
realization.
I
could
harden
them
one
of
the
things
that
so
when
we
were
revising
framework
design
guidelines.
A
We
added
the
consideration
for
if
you
have
a
thing
like
a
pushpot
pair
or
like
clock,
take
and
release
making
a
disposable
wrapper
around
that
operation.
So
that
is
a
thing
that
I
wanted
to
test
our
appetite
of
at
this
level.
So
that
would
be
essentially,
you
know,
using
open
sequence
and
then
the
dispose
of
that
will
call
pop
sequence
for
you,
with
the
tag
that
you
pushed.
What.
C
A
Oh
at
least
99%
of
my
usages
of
it
I
say
push
sequence
open
curly,
do
some
stuff
close
curly
pop
sequence,
yeah
I
think
I.
Actually,
you
should
put
the
pop
sequence
as
the
last
line
before
the
close
Carly
and
that's
when
I'm
being
sequence,
aka
ordered
list
of
fields
and
when
I'm
doing
sequence
of
its
pushed
sequence
for
each
pop
sequence,
so
I've
I,
don't
think
I've
ever
pushed
in
one
place
and
popped
in
another.
B
A
A
Another
would
be
to
make
open
sequence,
which
does
push
pop
and
leave
push
pop
as
is
and
another
another
would
be
push.
Sequence
returns,
the
disposable
state
which
I
can
make
be
an
it
impotant,
mostly
an
impotent
value
type
and
pop
sequence
becomes
editor,
browsable,
never
or
even
internal
I,
guess
private.
So
any
of
those
combinations
of
things
are
I.
Think
on
the
table,
for
what
we
feel
is
a
good
pattern
going
forward.
A
B
A
Not
done
it
before,
but
I
know
it's
a
common
pattern
for
things
that
aren't
the
BCL
and
so
in
in
framework
design
guidelines.
It
was
suggested
as
a
consider
and
so
now
this
is
this-
is
the
test
question
of.
Do
we
want
to
consider
doing
that
in
the
BCL
sure
and
what
happens
when
you
call
dispose
twice
I
like
I
said:
I
can
I
can
make
it
be
it
impotent
like
it
can
remember
which,
where
it
was
in
the
state
and
understand
that
it's
been
called.
C
A
Yeah
so
I
mean
disposable,
the
dispose
would
throw
if
pop
sequence
would
throw
unless
it
through,
because
it
thought
it
had
itself
already
run.
So
it
would
be
pop
sequence
with
some
ceremony,
but
throwing
out
of
the
middle
and
then
pop
sequence
complaining
that
you
you
had
done
I
guess
if
you
did
everything
with
a
using
it
would
balance
out.
B
D
A
A
We
just
can't
grow
the
structure
to
write
down
the
next
value,
at
which
point
you
either
get
an
ohm
from
what
you
did
or
you
get
the
oom
from
pop
sequence,
but
the
pop
sequence
couldn't
wouldn't
fail
due
to
an
invalid
state
unless
you
manually
called
push
sequence.
So
as
long
as
everything
was
done,
using
usings
the
push
sequence,
the
pop
sequence
would
always
be
valid
and
wouldn't
have
a
cut,
wouldn't
have
a
payload
basic,
throw.
B
A
A
This
is
all
in
memory
buffers
because
it
it's
to
regrow
them
whenever
pop
sequence
is
called.
If
you
wrote
more
than
128
bytes
of
payload,
it
has
to
go
shift
everything
by
some
number
of
bytes
to
go
make
space
for
the
length,
so
this
can
never
go
to
a
stream,
because
everything
that
you
do
essentially
you
don't
know
what
the
second
byte
of
the
payload.
Until
you
know
what
the
last
byte
is.
C
B
A
C
I
think
you'd
want
it
anyway,
just
because
I
yeah,
I
know
you
said
that
every
use
we
have
is
matched
in
the
same
function,
but
it
seems
totally
plausible
that
someone
would
put
these
in
little
helpers
or
wrap
them
in
some
way
at
which
point
you're,
then
passing
around
the
I
disposable,
which
gets
hairy.
So
I
think
you'd
probably
want
them
both
anyway.
You'd
want
the
convenience,
as
well
as
the
direct
methods,
yeah
fair.
A
Yeah,
no,
don't
need
that.
Oh
I
guess
one
thing
so
I
think
I
have
it
as
a
note
at
the
end,
which
I
can't
see
right
now,
because
I'm
presenting
back
to
writing
coded
value,
usually
the
time
that
I'm
calling
right
encoded
value
is
when
I've
needed
to
write
something
in
a
different
writer
for
a
nested
payload
for
complicated
reasons
and
then
I
wonder
if
it
makes
sense
to
have
a
public
method
of
writing
coded
value
of
a
writer
so
copy
the
the
contents
of
one
writer
into
the
other,
which
would
avoid
again.
A
A
A
Okay,
so
push
sequence
handles
both
the
sequence
and
sequence
of
because
they
encode
the
same
set
of
I,
put
the
of
in
the
name
again
because
of
the
ambiguous
paragraph,
a
set
of
structure
in
the
Surendar
encoding
rules,
even
because
the
set
is
technically
unordered.
But
surrender
are
all
about
making
sure
that
you
always
use
the
same
exact
sequence
of
bytes
to
represent
the
same
thing,
there's
an
internal
sort
that
has
to
run
on
the
data
they
have
to.
A
A
A
A
Then
the
data
is
itself
another
ASN
encoded
value,
and
this
is
one
of
the
places
that
I
frequently
have
found
myself
needing
to
create
two
writers
and
and
pass
their
data
back
and
forth.
And
then
it
seemed
to
make
sense
of
why
not
just
go
ahead
and
say
open
the
notion
of
we're
writing
an
octet
string
and
when
you
call
pop
I
will
turn
it
into
the
correct
primitive
value
for
you.
I
haven't
actually
written.
This
I
wrote
it
just
for
the
future
review.
A
B
A
A
Definitely
in
the
reader
will
have
a
version
that
cares
that
it's
an
enum
type
because
it
needs
to
you,
know
type
it
for
you
on
the
way
back
out,
but
but
yes,
so,
the
writer
numerated
value
of
object
will
throw
if
it's
yeah
so
argument
exception.
If
it's
not
a
boxed
enum
or
if
it's
backing
type
is
declared
as
flags.
Why.
C
A
A
B
C
No
okay
like
if
you
knew
that
it
was
a
day
of
week
right,
you
would
cast
it
to
a
day
a
week
and
he
used
the
gender
the
strongly
typed
one.
If
you
knew
that
it
was
an
int,
he
would
cast
it
to
an
int
and
use
right.
Integer
I'm
wondering
why
this
object,
one
ends
up
being
valuable,
but
the
other
all
the
other
ones
we
talked
about
bool
and
etc.
A
B
There
are
also
only
half
a
dozen
integral
types
in
the
framework
like
there
are
more
than
a
half
a
dozen
enum
types,
and
you
can
define
your
own,
so
I,
don't
I
any
anything
that
is
an
integer
can
always
be
cast
to
un
64
or
and
64
like
those
two
integers
are
universally
accepting
of
any
other
integral
type
within
the
framework.
No
such
thing
exists
for
enum
that
one
can
just
be
converted
to
straight-up
am
I.
Am
I
misunderstanding
that
I.
C
B
Have
if
I
have
a
box
I
can't
just
cast
it
to
it,
you
long!
No,
but
you
can
use
convert
dot
to
in
64
and
it
will
succeed
sure
but
I
there's
no
equivalent
of
that
for
enums,
like
that,
the
thing
is,
the
framework
actually
provides
an
out
for
turning
an
arbitrary
box
value
into
an
integer
of
a
specified
type.
Even
if
you
don't
know
what
the
original
type
was
where
a
normal
cast
would
fail,
because
it
can't
unbox
but
going
through
the
convert,
api's
or
similar
will
succeed.
A
A
A
The
Kate
yeah
so
popping
more
I
do
think
the
probably
the
reason
that
I
wrote
it
was
the
serializer
of
because
it
was
just
using
generic
walk
and
found.
Oh,
this
is
an
enum
thing.
Let's
call
right
enumerated
value
and
I
had
no
good
way
of
getting
back
into
a
generic
call
context
on
that
I
mean
I
could
use
reflection
to
do
generic
binding
at
that
point,
but
that's.
B
A
C
C
C
A
Dotnet
isms
and
ASN
isms
don't
line
up,
and
so
the
the
writer
and
correspondingly
the
reader
use
things
in
what
I
at
least
what
I
consider
to
be
the
dotnet
isms
and
now
I
guess
we
can
have
a
debate
of
whether
or
not
I'm
wrong.
So
what
hopefully,
everyone
can
see
right
now
is.
This
is
the
named
bit
list
definition
for
the
key
usage
data
type
in
x.509
extensions,
so
digital
signature
has
bit
zero.
A
A
B
A
E
C
C
F
B
B
A
B
A
A
Actually,
that
is
but
I
have
an
example
for
because
it's
a
name,
it's
a
bit
string.
So
the
the
third
bite
is
how
many
bits
were
unused
perfect.
So
then,
if
you
included
the
decipher
only
because
that
now
needs
an
extra
bite
than
the
value
grows,
so
it
doesn't
need
the
backing
size
of
the
enum,
because
it
already
has
a
way
that
it
needs
to
write
it
packed
and
the
non
flags
encodes,
just
as
an
integer
and
so
it'll
use
the
same
drop.
All
the
unnecessary
leading
bytes.
A
B
A
B
Really
I
thought
that
I
thought
that
there
was
a
difference
in
alignment
on
where
the
data
began
like
on
what
was
considered
the
most
significant
bit
between
the
two
scenarios.
I.
A
Mean
if
you
call
read
bit
string
on
the
reader
it'll
give
you
back
the
bytes
and
if
you
call
read
named
bit
list
on
the
reader,
it
will
do
all
of
the
understanding
what
byte
0
or
what
bit
0
means
for
you.
So
there's
a
there's
a
difference
in
the
reader
with
the
twist,
but
there's
not
a
there's,
not
really
a
difference
in
the
encoding.
B
A
And
then
there
are
rules
on
fractional
seconds?
I'll
get
two,
so
the
simplest
form
of
UTC
time
is
given
a
date
time
offset
write
it
down
so
it'll.
It
will
to
universal
the
value
for
you
and
then
it
will
write
it
down
according
to
the
rules
it
needs
to
and
because
you
provided
the
value,
it
will
accept
any
two-digit
year
as
a
valid
two-digit
year
and
ovals
write
it
down.
A
A
The
the
other
overload
allows
you
to
specify
what
you
wanted
the
two-digit
year
max
to
be
so
in
the
case
of
x.509
certificates,
the
two-digit
year
range
is
defined
to
be
1952,
20,
49
4
reasons,
and
so,
if
you
pass
20
49
is
two-digit
year
max.
But
you
give
a
value
that's
in
2050,
then
it
will
throw
of
your
writing
and
illegal
value.
So
this
is
simply
collar's,
not
writing
the.
If
it's
bigger
than
the
value
I
want
themselves.
E
A
Yeah
I
mean
I'm,
just
this
is
where
it
started
in
getting
weird
of,
because
now
we
have
write
UTC
time
that
takes
just
a
value
right,
UTC
time
that
takes
a
two-digit
year
max
so
would
would
you
have
the
the
four
pole
of
so
date
time
offset
then
date
time
offset
tag
then
date
time
offset
into
then
date.
Time
offset
into
tag
like
just
move
tag
to
last
in
all
of
the
overloads
that
have
it
move.
A
The
only
default
value
it
can
have
is
because
it's
a
struct
it
would.
It
would
be
a
tag
that
you're
not
allowed
to
specify
okay,
because
the
the
zero
byte
value
encoded
tag
is
a
reserved
word,
so
I
mean
we
could
do
that.
But
it's
it
feels
weird,
because
now
we're
past
now
we're
accepting
an
explicitly
illegal
value
and
then
changing
what
its
meaning
is.
A
A
E
A
C
E
C
A
B
A
A
A
A
Okay,
so
why
do
something
one
way
when
you
can
do
it
think
nine
or
ten
different
ways,
which
is
the
number
of
different
ways
that
you
can
write
text
strings
in
asn.1,
encoded
data,
so
there's
utf-8,
strings,
numeric,
strings,
printable,
strings,
t61
strings,
also
known
as
teletext
strings?
I
five
strings,
visible
strings,
BMP,
strings,
graphical
strings,
Universal
strings
and
some
others.
A
When
I
started
writing
this
I
originally
was
going
with,
if
there's
a
name
datatype
in
the
spec,
there's
a
named
method
group
and
it
just
got
stupid.
So
this
is
what
I
came
up
with.
Instead
is
write
character,
string
and
you
you
pass
in
that
the
universal
tag
number
inna
to
say,
which
kind
of
string
you
thought
it
was
so,
if
you're
giving
an
explicit
tag.
So
you're
saying
this
is
a
context
3
string,
but
it
needs
to
use
visible
string
encoding.
You
would
give
the
tag
as
context.
A
And
then
I
see
that
there
was
a
question
in
the
chat
about
why
support
the
two-digit
strings
at
all,
because
certificates
say
you
have
to
use
UTC
time
if
the
date
is
less
than
2050
and
have
to
use
generalised
time
otherwise.
So
there
are
cases
where
the
I
mean.
If
the
thing
says
it's
UTC
time,
you
have
to
do
it.
So
that's
why
the
writer
supports
it.
A
F
F
A
So
since
it's
a
reader,
it
can
take
of
a
read-only
memory
and
hold
on
to
it.
It
does
not
make
defensive
copies.
The
onus
is
on
the
the
caller
to
maintain
data
integrity
through
the
execution
of
the
reader,
and
it
takes
a
rule
set
and
anytime
it's
reading.
If
something
violates
the
rule
set,
it's
going
to
throw
whatever
we
decide
exception.
A
A
And
then
the
next
thing
that
someone
would
want
to
do
is
peek
tag,
so
I
think
I
had
a
thing
earlier.
That
said,
I
used
the
word,
so
peek
means
it
will
return
the
value
without
advancing
the
reader
and
read
means
it
will
return
the
value
and
advance
the
reader
there's
also
a
copy
which
will
probably
rename
to
read
when
we
get
there.
Okay,.
F
A
Okay,
so
these
are
so
this
next
set
of
operations
called
direct
data
interaction
again,
this
is
the
if
you,
if
something
weird
is
happening,
get
the
reader
out
of
the
way.
So
if
you
run
into
something
that
we
don't
support,
how
do
you?
How
do
you
deal
with
that?
And
so
again
everything
is
tag,
length
and
value.
So
if
you've
already
done
Peak
tag,
you
probably
don't
care
about
the
length
bytes
and
then
you
could
peek
at
the
encoded
value.
A
So
this
will
skip
the
tag
of
the
length
and
then
just
give
you
whatever
is
left
and
since
you
gave
the
memory
it'll
give
the
memory
back
to
you,
but
it's
only
for
the
the
one
value
and
then
there's
peak
sorry
peak
encoded.
Actually,
yes,
I
I
said
that
wrong
peak
encoded
value
is
the
tag
the
length
and
the
value
peak
content.
Bytes
is
only
the
payload
portion.
A
A
F
A
Okay,
oh
and
this
is
a
detail
that
I
glossed
over
in
the
writer
which
I'll
just
state
again
here.
So
when
we
talked
when
we
looked
at
the
tags,
we
saw
that
every
tag
has
a
bit
that
says
if
it's
primitive
or
constructed,
none
of
the
reader
or
writer
methods
care.
They
will.
They
only
look
at
the
class
and
value
of
whatever
tag
you
pass
in,
but
the
peek
tag
will
tell
you
what
is
exactly
encoded
in
in
the
stream,
which
is
the
reason
that
it
still
exists
in
the
struct.
A
A
Right
so
again,
we
can
there's
a
little
bit
of
work
that
could
be
done
on
the
exception
model.
One
thing
that
I've
been
so
the
existing
model
is
very
opaque.
Everything
throws
a
this
value
is
illegal
exception,
because
that's
what
we
got.
What
we
called
win32
and
I've
been
thinking
that
for
the
reader
it
would
be
nice
if
it
told
you
things
like
the
length
exceeds
the
payload
or
the
amount
of
payload
remaining
versus
read
boolean
of
in
in
sir
and
dira
modes.
F
Why
would
you
need
an
exception
types
though
right?
You
don't
really
expect
the
caller
to
handle
them
differently.
It's
just
it.
If
you
look
at
the
message,
it
should
be
actionable,
particularly
there's
something.
This
is
not
really
something
you
can
do
on
the
consuming
side
in
code,
but
it's
just
quite
a
different
program
will
give
you
different
data
right.
A
Okay,
read
null
which
is
really
validating
skip
because
it's
null
and
then
so
yeah
currently
here,
I
have
two
different
versions
of
read:
object:
identifier.
The
reason
for
read
object,
identifier
is
string
is
because
it
saves
on
both
memory
allocation
and
some
annoying
dictionary
lookups.
That
sometimes
happen
over
a
network
in
the
OED
constructor,
but
I
think
I
want
to
just,
even
though
we
have
a
strong
type
called
read,
object,
identifier,
I
think
now
I
want
to
change
the
proposal
to
say:
read:
object,
identifier,
returns
a
string
and
there's
only
the
one
version.
A
A
A
F
Yeah
that
point
it
just
depends
on
if
they
it's
the
same
thing,
your
hands
with
your
eye,
the
vast
majority
will
have
your
eyes
where
they
usually
have
strings.
That's
all
we
have
you
to
overloads
that
just
take
a
string,
so
people
not
everybody-
has
to
do
the
portion.
You
your
eye,
stringing
right
but
like
if
the
vast
majority
of
your
customers
don't
need
a
know
it,
but
they
just
need
a
string,
I
think
just
returning
a
string,
but
it
makes
sense
to
me
if
almost
everybody
needs
to
know
it
anyway.
A
Like
I
know
in
win32
there
are
things
that
are
you
know
interpreting
these
payloads.
They
they
actually
just
look
at
the
next
raw
data
and
do
a
mem
comp
against
the
pre
encoded
value
of
whatever
the
oh.
It
would
be.
I
tried
switching
some
of
our
code
to
do
that,
but
it's
really
hard
to
make
a
dictionary
that
does
a
lookup
based
on
a
span,
so
so
I
haven't
done
that
yet
yeah,
okay,
so
just
change
to
a
public
string,
read
object
identifier
and
get
rid
of
the
complication
all
right
integers.
A
So
the
easiest
version
is
just
give
me
the
bytes,
so
read:
integer
bytes
is
validate
the
tag
and
then
return
read
content
by
its
except
I.
Don't
have
read
content
by
its
own
way:
a
peek
content
bytes,
but
effectively.
That's
that's
what
it
is
it's
just
here
here
is
the
raw
data.
You
figure
it
out.
Please,
because.
F
A
Sorry
well,
two
to
those
255
minus
one:
I,
don't
know,
there's
a
there's,
a
minus
one
somewhere
naming
things
was
hard
right,
so
the
natural
type
that
this
corresponds
to
is
big
integer.
And
so
that's
why
I've,
given
the
simplest,
read
integer
the
return
type
of
big
integer,
because
if
it's
arbitrarily.
A
A
B
F
F
A
C
C
A
A
F
C
E
A
F
No
I
mean
like
I,
get
that
all
I'm
saying
is
that
if
it's
calling
for
people
to
have
to
read
by
its
weather-ready
idea
is
that
yeah
I
expect
the
way
to
between
0
and
255,
then
counting
the
last
four
would
not
be
great.
The
vast
majority
of
people
will
not
do
that.
Then.
That
means
it
makes
sense
right.
I.
A
F
A
A
A
A
The
next
most
common
operation,
so
if
you're
der
it
will
always
succeed
as
in
it
can't
return.
False
is
iyx,
I,
think
or
hope
this
data
is
contiguous.
Please
give
it
to
me
as
the
read-only
memory
without
doing
a
copy.
So
that's
what
I
currently
have
named?
Try
read
primitive
bit
string
value
and
then
there's
a
try
right
version
which
currently
uses
the
verb
copy.
A
So
primitive
in
this
case
means
that
the
in
the
tag
says
this
is
a
primitive
bit
string,
meaning
it
is
not
created
by
concatenated
several
nested
values
together.
The
primitive
and
construction
are
constructed.
Are
the
domain
terms
for
single
value
or
built
up
of
nested
values,
not
primitive,
as
in
like
int,
right.
F
F
A
F
A
A
All
right
so
then.
Well,
we
have
the
simple
case
of
return.
The
byte
array
and
the
next
simplest
case
of
its
contiguous.
Please
just
give
me
the
slice.
The
non-contiguous
don't
create.
An
array
would
be
the
try
right
pattern,
and
so
I
have
that
here.
Of
course,
there's
this
will
drop
to
just
the
one
that
has
a
defaulted
tag
which
solves
the
parameter
ordering
question
and
now
the
question
is:
should
we
say
copy,
because
that's
what
it's
doing
or
should
we
say
read,
so
we
only
have
two
verbs
on
the
on
the
concept
count.
F
So
I
think
copy
is
actually
good
term
here,
because
read
and
copy
both
imply
advancing,
but
all
the
other
read
ones.
I
guess
that's
actually
not
true,
because
I
mean
we
did
string
also
returns
an
array.
So
clearly
that's
copying.
Yeah
I
mean
we
just
try
written
yeah,
I
guess
in
that
case
just
go
with
it.
A
A
Okay,
so
now
sequence
and
sequence
of
God,
alright,
so
read
sequence
is
easy
sequence.
You
see
a
you,
it's
the
right
tag.
It
returns
a
reader
that
is
only
valid
over
the
nested
content,
so
in
the
case
of
class
a
s
and
reader,
this
is
object.
Creating,
but
the
object
it's
creating
is
small
and
the
GC
is
efficient.
A
Because,
frequently,
when
I
was
writing,
it
I
found
that
I
don't
necessarily
want
to
consume
the
data
in
the
order
it
was
written
down,
and
so
I
want
to
be
able
to
snap
and
say
this
was
the
first
complex
data
type
that
I
saw
and
now
I
need
to
read.
What's
after
it
to
understand
how
to
interpret
it,
so
it
just
seemed
to
match.
F
A
A
Yeah,
because
if
it's,
if
it's
not
using
an
indefinite
length
encoding,
then
read
sequence
stops
after
a
number
of
bytes,
and
so
then
they
would
be
upon
the
caller
to
track
that
they've
transitioned
states,
which
then
makes
the
if
we
go
back
to
the
helper
of
throw,
if
not
empty,
that
one
doesn't
make
sense
anymore
if
you're
not
like
it
makes
sense
with
this
model,
because
oh
I'm
reading
a
nested
complicated
type,
it's
only
supposed
to
have
three
fields.
Why
was
there
data
after
I
read
the
third
field
right.
A
A
A
That's
why
this
one's
complicated
so
by
default
I
mean
the
other
answer
is
that
we
always
skip
validation
when
reading,
but
but
I
went
with
everything
that
the
spec
said
is
true.
The
reader
validates
and
set
a
set
of
values
being
sorted.
The
reader
or
the
spec
says,
is
true,
and
then
somebody's
implementation
didn't
do
I.
F
A
So
read
enumerated,
values
should
look
like
I
have
read:
integer
bytes,
so
I
have
read
a
numerated
bytes
because,
oh
they
do
have
different
tags
names
bit
list
and
bit
string,
don't
have
different
tags,
but
enumerated
and
integer
do
okay
yeah.
So
this
is
just
give
me
the
bytes
and
I'll
deal
with
it
myself.
A
A
It
seems
very
unlikely
that
you
would
have
made
an
enum
type
smaller
than
what
the
spec
said.
I
mean
technically
they
could
have
grown
it
to
a
bite
to
a
short
through
revving
the
spec,
but
that
doesn't
feel
very
likely
as
opposed
to
you
know
that
it's
just
an
integer
and
you
want
to
get
it
as
the
integer.
So
again
the
escape
valve
is
you
can
read
the
bytes
raw
and
then
deal
with
it
yourself.
A
F
C
F
A
So
this
will
return.
This
can
return
back
like
it's,
not
gonna.
Do
is
defined
check
on
each
bit
that
was
set,
so
it
can
return
things
that
are
inconsistent
representations
or
use
bits
that
your
enum
hasn't
defined,
but
it
will
throw
if
more
bits
were
specified
in
the
payload,
then
your
Flags
enum
could
represent.
E
B
A
A
I
mean
I,
get
it
sort
of
come
because
they're,
actually
the
exact
same
encoding
using
the.
What
does
zero
mean?
It
probably
makes
more
sense
on
named
bit
list
honestly.
So,
okay,
we
could
do
named
read
named
bit
list
value
as
bit
array,
which
is
a
really
long
name,
but
I,
don't
know
how
to
do
better.
Yeah.
A
B
A
B
A
A
B
A
A
B
F
A
A
One
suggestion
that
I
got
after
putting
up
this
proposal
is
instead
of
having
it
be
a
method
default,
parameter
that
maybe
the
reader
wants
to
take
some
complicated
set
of
options
for
things
like.
If
you
see
a
UTC
time
and
I,
don't
explicitly
give
you
a
two-digit
year
max.
This
is
the
one
I
want
you
to
use,
so
that
would
let
you
build
a
reader
of
if
LDAP
uses
a
different
default
and
uses
it
consistently.
You
wouldn't
have
to
pass
it
at
every
single
call
to
the
method.
A
A
The
ASN
reader
would
gain
a
new
optional
constructor
parameter,
whether
it
be
overloading
or
default
parameter.
That
is
a
set
of
options
which
would
have
things
like
two-digit,
your
max
on
it
ice.
So
read
you
see,
read
UTC
time
with
no
parameters
would
say
using
whatever
my
pre-configured
default,
maxes.
F
F
B
A
B
A
A
Burr
is
allowed
to
write
it
down
as
a
time
with
a
where
the
time
zone
offset
great,
because
it's
a
flexible
spec
but
yeah
essentially
I
think
because
the
date
time
constructor
itself
will
throw
like
I'll
just
read
out:
January
80
and
I
passed
it
to
day
time
offset,
and
it
says
this
made
no
sense,
but
that
may
mean
it's
a
different
exception
type,
so
I
I
probably
have
a
test
or
somewhere.
Okay.
B
A
Right
so
read
generalize
time,
generalize
time,
some
of
the
x.509
specs
say
things
like
and
do
not
encode
fractional
seconds.
So
when
I
originally
wrote,
this
I
allowed
the
option
to
say
if
you
know
that
fraction
fractional
seconds
or
aspect
violation,
we
can
make
this
throw
here
with
a
normalized.
This
is
encoded
poorly.
But
if
people
think
it's
weird,
then
we
can
just
make
the
callers
who
care
check
on
the
thing
themselves
and
ask
what
the
fractional
seconds
are
and
throw
if
it's
not
zero.
I.
A
B
A
A
D
A
Super
common,
okay
and
character
strings,
so
the
simple
one
is
read:
character,
string
and
you
tell
me
what
kind
of
string
you
think
is
encoded,
as
this
is
the
closest
that
we
get
to
wear
a
tag
has
to
have
been
specified
to
something
and
then
there's
read
character,
string
with
a
where,
if
you
did
specify
the
tag.
If
the
tag
you
give
is
universal
and
it
doesn't
match
what
you
passed
for
universal
tag.
Number
that's
an
exception,
because
you've
asked
for
nonsense.
A
Otherwise
the
encoding
type
is
used
to
look
up.
The
system
text
encoding
class
that
we
have
that
corresponds
to
the
data
type,
and
so
it
has
every
piece
of
complication
that
we
could
possibly
have
and
we
can
decide
what
we
want
to
trim
out.
So
there's
read
character,
string,
which
returns
the
string,
there's
tri
copy
character
string,
which
puts
it
in
the
span
of
char
that
you
provide
to
it.
A
A
The
real
reason
for
having
the
escape
valves
on
these
is
I.
Don't
support
all
of
the
string
types
there's
one
called
general
general
yeah
general
string
that
LDAP
people
want
me
to
add,
but
there's
a
thing
that
we
need.
Somebody
who
understands
encodings
more
to
help
us
get
through
the
spec,
because
it
it
says
words
none
of
us
understand,
which
is
why
I
don't
support
it.
And
but
there
are
other
character,
string
types
that
just
I've
never
seen
and
the
encoding
wasn't
super
obvious,
and
so
this
is
all
just
for
escaping
valves.
So.
A
A
Bytes
is
the
only
thing
that
needs
a
tag
because
it
it
can't
figure
it
out
from
context,
or
we
could
just
say
the
overload
that
one
overload
takes
Universal
tag
number
and
the
other
one
takes
the
tag,
and
it
just
trusts
the
tag
number
that
you
gave
because
it's
not
it's
not.
It
doesn't
need
the
encoding,
so
it
doesn't
need
to
look
it
up
in
the
table.
A
A
Okay,
so
we
are
technically
over
time,
but
I
do
want
to
try
them
briefly.
If
anybody
still
has
a
few
minutes
address
the
the
destruct
or
the
the
span
version
of
the
reader.
So
there
are
two
different
high-level
options
that
come
to
mind.
One
is
what
I've
proposed
here
and
is
the
thing
that
I
added
in
dotnet
runtime
a
month
or
two
ago
is
a
SN
value
reader,
which
is
the
mutable
reference
and
value
reader
is
just
utility
methods,
so
it
can
only
do
one
thing
at
a
time
it
doesn't
maintain
state.
It
just
answers.
A
Yeah
I
mean
this:
is
you
know
in
things
like
SSL
stream
on
Mac,
the
ASN
reader
is
popping
up.
We
were
getting
like
in
while
reading
the
chain
on
a
Mac
for
SSL
stream.
We
would
create
like
150
readers,
which
is
just
means
that
you
know
doing
a
connect
and
getting
that
handshake
or
getting
the
call
back.
Firing
means
that
we
then
just
created.
C
A
A
A
D
A
After
I
did
this
and
I
up
a
bunch
of
our
a
bunch
of
the
stuff
to
use
it.
I
then
had
this
feeling
of
maybe
what
I
should
have
done.
Instead
was
just
utility
methods
which
probably
still
need
to
be
on
a
different
type,
because
they're
gonna
want
they
would
be
changing
static
versus
non
static
for
the
same
name
of
it
can
tell
you,
oh,
this
is
what
the
next
value
looks
like,
and
then
it
loses
all
the
parts
where
it
just
slices
and
moves
forward,
so
it
can
still
take
spans.
A
E
A
A
E
B
A
B
I'm,
what
I'm,
trying
to
figure
out
is
this.
If
we
wanted
to
have,
if
we
wanted
to
have
utility
methods
like
what
they
look,
would
they
look
unusable
different
than
having
this
value
reader
and
okay?
No,
no
I've,
yeah
I,
know
what
you
meant.
Okay,
yeah
ignore
me:
it's
been
a
long
month.
It
will
continue
to
be
a
long
month.
No.