 defineProperty  = require('util-ex/lib/defineProperty')
 createObject    = require('inherits-ex/lib/createObject')
 attributes      = createObject require('./attribute/type')
-try Codec       = require('buffer-codec')
+#try Codec       = require('buffer-codec')
 
 objectToString  = Object::toString
 getObjectKeys   = Object.keys

        encoding should have name property, encode and decode functions.
      '
    encoding
  constructor: (aTypeName, aOptions)->
    return super
  initialize: (aOptions)->
    defineProperty @, 'errors', null
    @_initialize aOptions if @_initialize
    @assign(aOptions)
  finalize: (aOptions)->
    @errors = null if @errors
    @encoding = null if @encoding
    @_finalize(aOptions) if @_finalize
  assign: (aOptions)->
    @errors = []
    if aOptions
      @encoding = @getEncoding aOptions.encoding
      # assign aOptions to @
      if @$attributes
        @$attributes.assignTo(aOptions, @)

isInheritedFrom = require('inherits-ex/lib/isInheritedFrom')
factory         = require('custom-factory')
deepEqual       = require('deep-equal')
isObject        = require('util-ex/lib/is/type/object')
