Skip to content
angerangel edited this page Mar 19, 2013 · 2 revisions

USAGE

   ENCODING? data

DESCRIPTION

Returns the media codec name for given binary data. (identify)

ENCODING? is a function value.

ARGUMENTS

  • data (binary!)

#SOURCE

encoding?: make function! [  [
    {Returns the media codec name for given binary data. (identify)}
    data [binary!]
    /local
][
    foreach [name codec] system/codecs [
        if do-codec codec/entry 'identify data [
            return name
        ]
    ]
    none
] ]
Clone this wiki locally