 : signed> ( x seq -- n )
     length 8 * 2dup 1 - bit? [ 2^ - ] [ drop ] if ; inline
 
-: slow-signed-le> ( bytes -- x ) [ le> ] [ signed> ] bi ;
-
-: slow-signed-be> ( bytes -- x ) [ be> ] [ signed> ] bi ;
+: slow-signed-le> ( seq -- x ) [ le> ] [ signed> ] bi ;
+
+: slow-signed-be> ( seq -- x ) [ be> ] [ signed> ] bi ;
 
 PRIVATE>
 
-: signed-be> ( bytes -- x )
+: signed-be> ( seq -- x )
     big-endian [
         dup length {
             { 1 [ int8_t deref ] }

        } case
    ] [ slow-signed-be> ] if-endian ;

: signed-le> ( bytes -- x )
    little-endian [
        dup length {
            { 1 [ int8_t deref ] }

SYMBOL: native-endianness
native-endianness [ compute-native-endianness ] initialize

HOOK: >native-endian native-endianness ( x n -- byte-array )

M: big-endian >native-endian >be ;

M: little-endian >native-endian >le ;

HOOK: unsigned-native-endian> native-endianness ( x -- byte-array )

M: big-endian unsigned-native-endian> be> ;

