Apply rotation and translation to bones(Math)
Well I solved the problem already. I realized the transforms are done in the bone's local space, so they need to be calculated with the editbone's matrix before applying to the posebone.

for i in range(0, len(bones)):
    name = 'Bone.'+str(i)
    tran = frame.dTransforms[i]
    pb = pose.bones[name]
    eb = armature.bones[name]
    m1 = eb.matrix['BONESPACE'].rotationPart()
    e1 = m1.toEuler()
    e = Mathutils.Euler(tran.rotX,tran.rotY,tran.rotZ)
    e2 = Mathutils.Euler(e1.x+e.x,e1.y+e.y,e1.z+e.z)
    m2 = e2.toMatrix()
    m = m2*(m1.copy().invert())
    pb.quat = m.toQuat()
    pb.loc = m1*Mathutils.Vector(tran.locX,tran.locY,tran.locZ)