9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] enc64() vs dec64()
@ 2015-06-22  9:05 Oleg
  2015-06-22 10:10 ` Charles Forsyth
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg @ 2015-06-22  9:05 UTC (permalink / raw)
  To: 9fans

  Hi, all.

May be a stupid question. enc64() returns a null terminated string. But dec64()
not doing the same. What is the reason for it?

Thanks.

-- 
Неманов Олег (Nemanov Oleg)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] enc64() vs dec64()
  2015-06-22  9:05 [9fans] enc64() vs dec64() Oleg
@ 2015-06-22 10:10 ` Charles Forsyth
  2015-06-22 10:30   ` Oleg
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Forsyth @ 2015-06-22 10:10 UTC (permalink / raw)
  To: Oleg, Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

On 22 June 2015 at 10:05, Oleg <lego12239@yandex.ru> wrote:

> May be a stupid question. enc64() returns a null terminated string. But
> dec64()
> not doing the same. What is the reason for it?
>

enc: binary -> string
dec: string -> binary

binary is just an array of bytes, and there isn't a special terminating
value

[-- Attachment #2: Type: text/html, Size: 771 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] enc64() vs dec64()
  2015-06-22 10:10 ` Charles Forsyth
@ 2015-06-22 10:30   ` Oleg
  0 siblings, 0 replies; 3+ messages in thread
From: Oleg @ 2015-06-22 10:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Jun 22, 2015 at 11:10:04AM +0100, Charles Forsyth wrote:
> On 22 June 2015 at 10:05, Oleg <lego12239@yandex.ru> wrote:
> 
> > May be a stupid question. enc64() returns a null terminated string. But
> > dec64()
> > not doing the same. What is the reason for it?
> >
> 
> enc: binary -> string
> dec: string -> binary
> 
> binary is just an array of bytes, and there isn't a special terminating
> value

You're right. I use base64 to mask a white space symbols in strings and i
completely forgot about the main base64 purpose :-).

Thank you!

-- 
Неманов Олег (Nemanov Oleg)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-22 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22  9:05 [9fans] enc64() vs dec64() Oleg
2015-06-22 10:10 ` Charles Forsyth
2015-06-22 10:30   ` Oleg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).