Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

One Bell System - it sometimes works.


devel / comp.unix.shell / Re: About the big-endian and little-endian.

SubjectAuthor
* About the big-endian and little-endian.hongy...@gmail.com
`* About the big-endian and little-endian.Janis Papanagnou
 `- About the big-endian and little-endian.hongy...@gmail.com

1
About the big-endian and little-endian.

<3b93482a-421e-43a8-9d9a-d1cf557a4612n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6570&group=comp.unix.shell#6570

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:6214:1633:b0:649:a653:680c with SMTP id e19-20020a056214163300b00649a653680cmr81971qvw.3.1692712712238;
Tue, 22 Aug 2023 06:58:32 -0700 (PDT)
X-Received: by 2002:a63:79c7:0:b0:56c:2d62:4e2a with SMTP id
u190-20020a6379c7000000b0056c2d624e2amr1119130pgc.2.1692712711904; Tue, 22
Aug 2023 06:58:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Tue, 22 Aug 2023 06:58:31 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=173.230.146.93; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 173.230.146.93
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3b93482a-421e-43a8-9d9a-d1cf557a4612n@googlegroups.com>
Subject: About the big-endian and little-endian.
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Tue, 22 Aug 2023 13:58:32 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1348
 by: hongy...@gmail.com - Tue, 22 Aug 2023 13:58 UTC

See my following example:

werner@X10DAi:~$ echo -n -e "\x12\x34\x56\x78" | od -An -x --endian=big
1234 5678
werner@X10DAi:~$ echo -n -e "\x12\x34\x56\x78" | od -An -x --endian=little
3412 7856

Could you tell me why the latter doesn't give the following result?

7856 3412,
aka,
0x78 0x56 0x34 0x12

Regards,
Zhao

Re: About the big-endian and little-endian.

<uc2ht1$2erik$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6572&group=comp.unix.shell#6572

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: About the big-endian and little-endian.
Date: Tue, 22 Aug 2023 16:49:05 +0200
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <uc2ht1$2erik$1@dont-email.me>
References: <3b93482a-421e-43a8-9d9a-d1cf557a4612n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Aug 2023 14:49:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c949e87bf9bb1acea2fb9fbb5cded949";
logging-data="2584148"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ctluGT+uGZK9nkysvSX9b"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:se1yN73RfAJ8NRp6x+IvBexm7x4=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <3b93482a-421e-43a8-9d9a-d1cf557a4612n@googlegroups.com>
 by: Janis Papanagnou - Tue, 22 Aug 2023 14:49 UTC

On 22.08.2023 15:58, hongy...@gmail.com wrote:
> See my following example:
>
> werner@X10DAi:~$ echo -n -e "\x12\x34\x56\x78" | od -An -x --endian=big
> 1234 5678
> werner@X10DAi:~$ echo -n -e "\x12\x34\x56\x78" | od -An -x --endian=little
> 3412 7856

(My 'od' doesn't support '--endian'; I use different options below
and show only the little-endian results.)

>
> Could you tell me why the latter doesn't give the following result?

Endian-ness swaps bytes in "words" (default "word" is 2 octets; you
define what a "word" is).

$ echo -n -e $'\x12\x34\x56\x78' | od -An -t x1
12 34 56 78
$ echo -n -e $'\x12\x34\x56\x78' | od -An -t x2
3412 7856
$ echo -n -e $'\x12\x34\x56\x78' | od -An -t x4
78563412
$ echo -n -e $'\x12\x34\x56\x78\x90\xab' | od -An -t x8
0000ab9078563412

Janis

>
> 7856 3412,
> aka,
> 0x78 0x56 0x34 0x12
>
> Regards,
> Zhao
>

Re: About the big-endian and little-endian.

<a203bd98-4a59-4da9-ac83-657ae954e1b9n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6573&group=comp.unix.shell#6573

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:620a:8c13:b0:76d:aaa7:eb1c with SMTP id qz19-20020a05620a8c1300b0076daaa7eb1cmr58849qkn.8.1692751645552;
Tue, 22 Aug 2023 17:47:25 -0700 (PDT)
X-Received: by 2002:a17:903:2305:b0:1b7:ef3f:5ed3 with SMTP id
d5-20020a170903230500b001b7ef3f5ed3mr6020974plh.5.1692751645019; Tue, 22 Aug
2023 17:47:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Tue, 22 Aug 2023 17:47:24 -0700 (PDT)
In-Reply-To: <uc2ht1$2erik$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=208.86.32.27; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 208.86.32.27
References: <3b93482a-421e-43a8-9d9a-d1cf557a4612n@googlegroups.com> <uc2ht1$2erik$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a203bd98-4a59-4da9-ac83-657ae954e1b9n@googlegroups.com>
Subject: Re: About the big-endian and little-endian.
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Wed, 23 Aug 2023 00:47:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2498
 by: hongy...@gmail.com - Wed, 23 Aug 2023 00:47 UTC

On Tuesday, August 22, 2023 at 10:49:11 PM UTC+8, Janis Papanagnou wrote:
> On 22.08.2023 15:58, hongy...@gmail.com wrote:
> > See my following example:
> >
> > werner@X10DAi:~$ echo -n -e "\x12\x34\x56\x78" | od -An -x --endian=big
> > 1234 5678
> > werner@X10DAi:~$ echo -n -e "\x12\x34\x56\x78" | od -An -x --endian=little
> > 3412 7856
> (My 'od' doesn't support '--endian'; I use different options below
> and show only the little-endian results.)

What's your version of 'od'? Mine is as follows:

werner@X10DAi:~$ od --version|head -1
od (GNU coreutils) 8.32

> >
> > Could you tell me why the latter doesn't give the following result?
> Endian-ness swaps bytes in "words" (default "word" is 2 octets; you
> define what a "word" is).
>
> $ echo -n -e $'\x12\x34\x56\x78' | od -An -t x1
> 12 34 56 78
> $ echo -n -e $'\x12\x34\x56\x78' | od -An -t x2
> 3412 7856
> $ echo -n -e $'\x12\x34\x56\x78' | od -An -t x4
> 78563412
> $ echo -n -e $'\x12\x34\x56\x78\x90\xab' | od -An -t x8
> 0000ab9078563412

Got it. Thank you very much for your explanation.
>
> Janis

Zhao

> >
> > 7856 3412,
> > aka,
> > 0x78 0x56 0x34 0x12
> >
> > Regards,
> > Zhao
> >

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor