[mongodb-dev] BinData

1,276 views
Skip to first unread message

Joson Mandaro

unread,
Feb 13, 2011, 5:50:55 AM2/13/11
to mongo...@googlegroups.com
Hi all,
    I found Gridfs can encode files in two spec:

BinData(0,"Q1dTCf8nAAB4nM0...")
BinData(2,"qBYAAENXUwn9Jw...")

what's '0' and '2' meaning? And there's any information about BinData() ?
Best Regards,

Joson

Kyle Banker

unread,
Feb 13, 2011, 6:03:41 AM2/13/11
to mongo...@googlegroups.com
The 0 and 2 are subtypes, used to give sense of what kind of binary
data we're encoding. For instance, there's a subtype for md5. They're
all explained in the bsonspec: http://bsonspec.org/#/specification

The drivers used to encode GridFS binary as subtype 2, but that's been
deprecated in favor of subtype 0. Once 1.8 is released, most of the
drivers should be using type 0.

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-dev" group.
> To post to this group, send email to mongo...@googlegroups.com.
> To unsubscribe from this group, send email to
> mongodb-dev...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mongodb-dev?hl=en.
>

Reply all
Reply to author
Forward
0 new messages