CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/iax2/codecs/a_law.rb
Views: 11766
1
# -*- coding: binary -*-
2
module Rex
3
module Proto
4
module IAX2
5
module Codecs
6
class ALaw < G711
7
8
def self.decode(buff)
9
buff.unpack("C*").map{ |x| LOOKUP_ALAW2LIN16[x] }.pack('v*')
10
end
11
12
end
13
end
14
end
15
end
16
end
17
18