type of values

26 views
Skip to first unread message

GIOVAZ

unread,
Nov 28, 2017, 6:50:06 AM11/28/17
to Redis DB
Hi,
I'm working on a Redis Instance, my values are of the kind:

"@K\x80\r\x0e\x80ht"



what kind of data are they? Hexadecimal? Byte Array?

Thanks.

Itamar Haber

unread,
Nov 28, 2017, 8:33:10 AM11/28/17
to Redis DB
Hello Giovaz,

The values are binary strings and should be treated as byte arrays. The '\xnn' format denotes the character's code in hexadecimal decimal format. E.g.:

127.0.0.1:6379> ECHO "\x72\x65\x64\x69\x73"
"redis"

Cheers

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.



--

Itamar Haber | Chief OSS Education Officer
Redis Labs ~/redis

Mobile: +972 (54) 567 9692
Twitter: @itamarhaber
Skype: itamar.haber

GIOVAZ

unread,
Dec 7, 2017, 2:56:22 AM12/7/17
to Redis DB
thanks!

How can I write a byte array to Redis?

I am doing a program for arduino, I can write int, double and so on, but
I can't write a  byte array. Must I convert it to in hexadecimal decimal format?





Il giorno martedì 28 novembre 2017 14:33:10 UTC+1, Itamar Haber ha scritto:
Hello Giovaz,

The values are binary strings and should be treated as byte arrays. The '\xnn' format denotes the character's code in hexadecimal decimal format. E.g.:

127.0.0.1:6379> ECHO "\x72\x65\x64\x69\x73"
"redis"

Cheers
On Tue, Nov 28, 2017 at 1:27 PM, GIOVAZ <seea...@gmail.com> wrote:
Hi,
I'm working on a Redis Instance, my values are of the kind:

"@K\x80\r\x0e\x80ht"



what kind of data are they? Hexadecimal? Byte Array?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.

To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Itamar Haber

unread,
Dec 7, 2017, 9:32:19 AM12/7/17
to Redis DB
That depends on the language you're using and the client (if any) - it would be best if you could provide a small snippet of what you have. A byte array is one byte (perhaps you have chars?) after another. The hex notation is strictly Redis' - your code should just pass a "string", made of whatever bytes you want.

To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.

To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages